Home
last modified time | relevance | path

Searched refs:UserInterface (Results 1 – 25 of 128) sorted by relevance

123456

/webtrees/tests/app/Services/
H A DUserServiceTest.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
117 $tree->setUserPreference($user, UserInterface::PREF_TREE_ACCOUNT_XREF, $indi->xref());
144 $admin->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
161 … $tree->setUserPreference($user1, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_MANAGER);
162 … $tree->setUserPreference($user2, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_MODERATOR);
163 $tree->setUserPreference($user3, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_EDITOR);
164 $tree->setUserPreference($user4, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_MEMBER);
181 … $tree->setUserPreference($user1, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_MANAGER);
182 … $tree->setUserPreference($user2, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_MODERATOR);
183 $tree->setUserPreference($user3, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_EDITOR);
[all …]
/webtrees/app/
H A DAuth.php22 use Fisharebest\Webtrees\Contracts\UserInterface; alias
54 * @param UserInterface|null $user
58 public static function isAdmin(UserInterface|null $user = null): bool
62 return $user->getPreference(UserInterface::PREF_IS_ADMINISTRATOR) === '1';
69 * @param UserInterface|null $user
73 public static function isManager(Tree $tree, UserInterface|null $user = null): bool
77 …::isAdmin($user) || $tree->getUserPreference($user, UserInterface::PREF_TREE_ROLE) === UserInterfa…
84 * @param UserInterface|null $user
88 public static function isModerator(Tree $tree, UserInterface|null $user = null): bool
94 … $tree->getUserPreference($user, UserInterface::PREF_TREE_ROLE) === UserInterface::ROLE_MODERATOR;
[all …]
H A DTree.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
263 * @param UserInterface $user
269 …public function setUserPreference(UserInterface $user, string $setting_name, string $setting_value…
293 * @param UserInterface $user
299 …public function getUserPreference(UserInterface $user, string $setting_name, string $default = '')…
327 * @param UserInterface $user
331 public function canAcceptChanges(UserInterface $user): bool
382 if (Auth::user()->getPreference(UserInterface::PREF_AUTO_ACCEPT_EDITS) === '1') {
427 if (Auth::user()->getPreference(UserInterface::PREF_AUTO_ACCEPT_EDITS) === '1') {
472 if (Auth::user()->getPreference(UserInterface::PREF_AUTO_ACCEPT_EDITS) === '1') {
[all …]
/webtrees/app/Services/
H A DMessageService.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
86 * @param UserInterface $sender
87 * @param UserInterface $recipient
95 …public function deliverMessage(UserInterface $sender, UserInterface $recipient, string $subject, s…
101 I18N::init($recipient->getPreference(UserInterface::PREF_LANGUAGE));
148 * @param UserInterface $user
152 public function sendInternalMessage(UserInterface $user): bool
154 return in_array($user->getPreference(UserInterface::PREF_CONTACT_METHOD), [
165 * @param UserInterface $user
169 public function sendEmail(UserInterface $user): bool
[all …]
H A DUserService.php24 use Fisharebest\Webtrees\Contracts\UserInterface; alias
96 ->where('setting_name', '=', UserInterface::PREF_TREE_ACCOUNT_XREF)
135 * @return Closure(UserInterface,UserInterface):int
139 return static function (UserInterface $user1, UserInterface $user2) {
140 $registered_at1 = (int) $user1->getPreference(UserInterface::PREF_TIMESTAMP_REGISTERED);
141 $logged_in_at1 = (int) $user1->getPreference(UserInterface::PREF_TIMESTAMP_ACTIVE);
142 $registered_at2 = (int) $user2->getPreference(UserInterface::PREF_TIMESTAMP_REGISTERED);
143 $logged_in_at2 = (int) $user2->getPreference(UserInterface::PREF_TIMESTAMP_ACTIVE);
154 * @return Closure(UserInterface):bool
158 return static function (UserInterface $user) use ($timestamp): bool {
[all …]
H A DEmailService.php22 use Fisharebest\Webtrees\Contracts\UserInterface; alias
57 * @param UserInterface $from
58 * @param UserInterface $to
59 * @param UserInterface $reply_to
66 …public function send(UserInterface $from, UserInterface $to, UserInterface $reply_to, string $subj…
89 * @param UserInterface $from
90 * @param UserInterface $to
91 * @param UserInterface $reply_to
98 …protected function message(UserInterface $from, UserInterface $to, UserInterface $reply_to, string…
H A DHomePageService.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
84 * @param UserInterface $user
88 …public function userBlock(ServerRequestInterface $request, UserInterface $user): ModuleBlockInterf…
138 * @param UserInterface $user
142 public function availableTreeBlocks(Tree $tree, UserInterface $user): Collection
153 * @param UserInterface $user
157 public function availableUserBlocks(Tree $tree, UserInterface $user): Collection
168 * @param UserInterface $user
173 public function treeBlocks(Tree $tree, UserInterface $user, string $location): Collection
218 * @param UserInterface $user
[all …]
/webtrees/app/Http/RequestHandlers/
H A DUserEditAction.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
96 … if ($approved && $edit_user->getPreference(UserInterface::PREF_IS_ACCOUNT_APPROVED) !== '1') {
97 I18N::init($edit_user->getPreference(UserInterface::PREF_LANGUAGE));
113 $edit_user->setPreference(UserInterface::PREF_THEME, $theme);
114 $edit_user->setPreference(UserInterface::PREF_LANGUAGE, $language);
115 $edit_user->setPreference(UserInterface::PREF_TIME_ZONE, $timezone);
116 $edit_user->setPreference(UserInterface::PREF_CONTACT_METHOD, $contact_method);
117 $edit_user->setPreference(UserInterface::PREF_NEW_ACCOUNT_COMMENT, $comment);
118 $edit_user->setPreference(UserInterface::PREF_AUTO_ACCEPT_EDITS, (string) $auto_accept);
119 $edit_user->setPreference(UserInterface::PREF_IS_VISIBLE_ONLINE, (string) $visible_online);
[all …]
H A DRegisterAction.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
129 $user->setPreference(UserInterface::PREF_LANGUAGE, I18N::languageTag());
130 $user->setPreference(UserInterface::PREF_TIME_ZONE, Site::getPreference('TIMEZONE'));
131 $user->setPreference(UserInterface::PREF_IS_EMAIL_VERIFIED, '');
132 $user->setPreference(UserInterface::PREF_IS_ACCOUNT_APPROVED, '');
133 $user->setPreference(UserInterface::PREF_TIMESTAMP_REGISTERED, date('U'));
134 $user->setPreference(UserInterface::PREF_VERIFICATION_TOKEN, $token);
135 …$user->setPreference(UserInterface::PREF_CONTACT_METHOD, MessageService::CONTACT_METHOD_INTERNAL_A…
136 $user->setPreference(UserInterface::PREF_NEW_ACCOUNT_COMMENT, $comments);
137 $user->setPreference(UserInterface::PREF_IS_VISIBLE_ONLINE, '1');
[all …]
H A DUserAddAction.php22 use Fisharebest\Webtrees\Contracts\UserInterface; alias
86 $new_user->setPreference(UserInterface::PREF_IS_EMAIL_VERIFIED, '1');
87 $new_user->setPreference(UserInterface::PREF_IS_ACCOUNT_APPROVED, '1');
88 $new_user->setPreference(UserInterface::PREF_LANGUAGE, I18N::languageTag());
89 $new_user->setPreference(UserInterface::PREF_TIME_ZONE, Site::getPreference('TIMEZONE'));
90 $new_user->setPreference(UserInterface::PREF_TIMESTAMP_REGISTERED, date('U'));
91 $new_user->setPreference(UserInterface::PREF_TIMESTAMP_ACTIVE, '0');
H A DLoginAction.php24 use Fisharebest\Webtrees\Contracts\UserInterface; alias
123 if ($user->getPreference(UserInterface::PREF_IS_EMAIL_VERIFIED) !== '1') {
128 if ($user->getPreference(UserInterface::PREF_IS_ACCOUNT_APPROVED) !== '1') {
135 Auth::user()->setPreference(UserInterface::PREF_TIMESTAMP_ACTIVE, (string) time());
137 Session::put('language', Auth::user()->getPreference(UserInterface::PREF_LANGUAGE));
138 Session::put('theme', Auth::user()->getPreference(UserInterface::PREF_THEME));
139 I18N::init(Auth::user()->getPreference(UserInterface::PREF_LANGUAGE));
/webtrees/tests/app/
H A DTreeTest.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
103 $user->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
116 $user->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
122 $user->setPreference(UserInterface::PREF_AUTO_ACCEPT_EDITS, '1');
136 $user->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
149 $user->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
155 $user->setPreference(UserInterface::PREF_AUTO_ACCEPT_EDITS, '1');
169 $user->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
182 $user->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
188 $user->setPreference(UserInterface::PREF_AUTO_ACCEPT_EDITS, '1');
[all …]
/webtrees/resources/views/admin/
H A Dusers-edit.phtml6 use Fisharebest\Webtrees\Contracts\UserInterface; alias
24 * @var UserInterface $user
101 …ut type="checkbox" name="verified" value="1" <?= $user->getPreference(UserInterface::PREF_IS_EMAIL…
105 …ut type="checkbox" name="approved" value="1" <?= $user->getPreference(UserInterface::PREF_IS_ACCOU…
130 …ts/select', ['name' => 'language', 'selected' => $user->getPreference(UserInterface::PREF_LANGUAGE…
140 …ts/select', ['name' => 'timezone', 'selected' => $user->getPreference(UserInterface::PREF_TIME_ZON…
155 …type="checkbox" name="auto_accept" value="1" <?= $user->getPreference(UserInterface::PREF_AUTO_ACC…
173 …ible-online" name="visible-online" value="1" <?= $user->getPreference(UserInterface::PREF_IS_VISIB…
189 …thod', 'name' => 'contact-method', 'selected' => $user->getPreference(UserInterface::PREF_CONTACT_…
203 …nents/select', ['name' => 'theme', 'selected' => $user->getPreference(UserInterface::PREF_THEME), …
[all …]
/webtrees/tests/feature/
H A DPrivacy.php22 use Fisharebest\Webtrees\Contracts\UserInterface; alias
55 $admin->setPreference(UserInterface::PREF_IS_ADMINISTRATOR, '1');
58 … $tree->setUserPreference($manager, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_MANAGER);
61 …$tree->setUserPreference($moderator, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_MODERATOR);
64 … $tree->setUserPreference($editor, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_EDITOR);
67 … $tree->setUserPreference($member, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_MEMBER);
70 … $tree->setUserPreference($visitor, UserInterface::PREF_TREE_ROLE, UserInterface::ROLE_VISITOR);
150 $tree->setUserPreference($member, UserInterface::PREF_TREE_ACCOUNT_XREF, $savannah->xref());
151 $tree->setUserPreference($member, UserInterface::PREF_TREE_PATH_LENGTH, '3');
153 $tree->setUserPreference($member, UserInterface::PREF_TREE_PATH_LENGTH, '4');
/webtrees/app/Factories/
H A DTimestampFactory.php25 use Fisharebest\Webtrees\Contracts\UserInterface; alias
42 * @param UserInterface|null $user
46 public function make(int $timestamp, UserInterface|null $user = null): TimestampInterface
49 … $timezone = $user->getPreference(UserInterface::PREF_TIME_ZONE, Site::getPreference('TIMEZONE'));
58 * @param UserInterface|null $user
62 …public function fromString(string|null $string, string $format = 'Y-m-d H:i:s', UserInterface|null…
75 * @param UserInterface|null $user
79 public function now(UserInterface|null $user = null): TimestampInterface
/webtrees/app/Cli/Commands/
H A DUserList.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
54 … $registered = (int) $user->getPreference(setting_name: UserInterface::PREF_TIMESTAMP_REGISTERED);
55 … $last_login = (int) $user->getPreference(setting_name: UserInterface::PREF_TIMESTAMP_ACTIVE);
75 … $user->getPreference(setting_name: UserInterface::PREF_IS_ACCOUNT_APPROVED) ? 'Yes' : 'No',
76 … $user->getPreference(setting_name: UserInterface::PREF_IS_EMAIL_VERIFIED) ? 'Yes' : 'No',
77 $user->getPreference(setting_name: UserInterface::PREF_LANGUAGE),
78 $user->getPreference(setting_name: UserInterface::PREF_TIME_ZONE),
79 $user->getPreference(setting_name: UserInterface::PREF_CONTACT_METHOD),
H A DUserCreate.php22 use Fisharebest\Webtrees\Contracts\UserInterface; alias
115 $user->setPreference(setting_name: UserInterface::PREF_TIME_ZONE, setting_value: $timezone);
116 $user->setPreference(setting_name: UserInterface::PREF_LANGUAGE, setting_value: $language);
117 … $user->setPreference(setting_name: UserInterface::PREF_IS_ACCOUNT_APPROVED, setting_value: '1');
118 … $user->setPreference(setting_name: UserInterface::PREF_IS_EMAIL_VERIFIED, setting_value: '1');
119 …$user->setPreference(setting_name: UserInterface::PREF_CONTACT_METHOD, setting_value: 'messaging');
123 … $user->setPreference(setting_name: UserInterface::PREF_IS_ADMINISTRATOR, setting_value: '1');
/webtrees/tests/app/Http/Middleware/
H A DAuthModeratorTest.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
43 $user->method('getPreference')->with(UserInterface::PREF_IS_ADMINISTRATOR)->willReturn('');
46 …$tree->method('getUserPreference')->with($user, UserInterface::PREF_TREE_ROLE)->willReturn(UserInt…
65 $user->method('getPreference')->with(UserInterface::PREF_IS_ADMINISTRATOR)->willReturn('');
68 …$tree->method('getUserPreference')->with($user, UserInterface::PREF_TREE_ROLE)->willReturn(UserInt…
H A DAuthEditorTest.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
43 $user->method('getPreference')->with(UserInterface::PREF_IS_ADMINISTRATOR)->willReturn('');
46 …$tree->method('getUserPreference')->with($user, UserInterface::PREF_TREE_ROLE)->willReturn(UserInt…
65 $user->method('getPreference')->with(UserInterface::PREF_IS_ADMINISTRATOR)->willReturn('');
68 …$tree->method('getUserPreference')->with($user, UserInterface::PREF_TREE_ROLE)->willReturn(UserInt…
H A DAuthManagerTest.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
43 $user->method('getPreference')->with(UserInterface::PREF_IS_ADMINISTRATOR)->willReturn('');
46 …$tree->method('getUserPreference')->with($user, UserInterface::PREF_TREE_ROLE)->willReturn(UserInt…
65 $user->method('getPreference')->with(UserInterface::PREF_IS_ADMINISTRATOR)->willReturn('');
68 …$tree->method('getUserPreference')->with($user, UserInterface::PREF_TREE_ROLE)->willReturn(UserInt…
/webtrees/app/Contracts/
H A DTimestampFactoryInterface.php29 * @param UserInterface|null $user
33 public function make(int $timestamp, UserInterface|null $user = null): TimestampInterface;
38 * @param UserInterface|null $user
42 …public function fromString(string|null $string, string $format = 'Y-m-d H:i:s', UserInterface|null…
45 * @param UserInterface|null $user
49 public function now(UserInterface|null $user = null): TimestampInterface;
/webtrees/app/Statistics/Repository/
H A DLatestUserRepository.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
64 * @return UserInterface
66 private function latestUserQuery(): UserInterface
70 if ($user instanceof UserInterface) {
79 ->where('us.setting_name', '=', UserInterface::PREF_TIMESTAMP_REGISTERED);
117 $timestamp = (int) $user->getPreference(UserInterface::PREF_TIMESTAMP_REGISTERED);
132 return date($format, (int) $user->getPreference(UserInterface::PREF_TIMESTAMP_REGISTERED));
H A DUserRepository.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
71 … if (Auth::isAdmin() || $user->getPreference(UserInterface::PREF_IS_VISIBLE_ONLINE) === '1') {
110 …stry::individualFactory()->make($this->tree->getUserPreference($user, UserInterface::PREF_TREE_ACC…
120 …if ($user->getPreference(UserInterface::PREF_CONTACT_METHOD) !== MessageService::CONTACT_METHOD_NO…
156 * @param UserInterface $user
160 private function isUserVisible(UserInterface $user): bool
162 … return Auth::isAdmin() || $user->getPreference(UserInterface::PREF_IS_VISIBLE_ONLINE) === '1';
/webtrees/tests/app/Http/RequestHandlers/
H A DAccountUpdateTest.php23 use Fisharebest\Webtrees\Contracts\UserInterface; alias
45 …lf::withConsecutive([UserInterface::PREF_CONTACT_METHOD, UserInterface::PREF_LANGUAGE, UserInterfa…
50 …$tree->expects($this->once())->method('setUserPreference')->with($user, UserInterface::PREF_TREE_D…
/webtrees/resources/views/
H A Dedit-account-page.phtml5 use Fisharebest\Webtrees\Contracts\UserInterface; alias
20 * @var UserInterface $user
105 …ts/select', ['name' => 'language', 'selected' => $user->getPreference(UserInterface::PREF_LANGUAGE…
114 …ts/select', ['name' => 'timezone', 'selected' => $user->getPreference(UserInterface::PREF_TIME_ZON…
138 …method', 'id' => 'contact-method', 'selected' => $user->getPreference(UserInterface::PREF_CONTACT_…
150 … 'name' => 'visible-online', 'checked' => (bool) $user->getPreference(UserInterface::PREF_IS_VISIB…

123456