instances added god may help
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
* @var array $user
|
||||
*/
|
||||
|
||||
use MintyPHP\Router;
|
||||
use MintyPHP\Service\User\UserServicesFactory;
|
||||
use MintyPHP\Session;
|
||||
use MintyPHP\Service\User\UserAvatarService;
|
||||
|
||||
$values = $form ?? $user ?? [];
|
||||
$avatarUuid = (string) ($values['uuid'] ?? '');
|
||||
$hasAvatar = $avatarUuid !== '' && UserAvatarService::hasAvatar($avatarUuid);
|
||||
$userAvatarService = (new UserServicesFactory())->createUserAvatarService();
|
||||
$hasAvatar = $avatarUuid !== '' && $userAvatarService->hasAvatar($avatarUuid);
|
||||
$currentUserId = (int) ($_SESSION['user']['id'] ?? 0);
|
||||
$isOwnAccount = $currentUserId > 0 && $currentUserId === (int) ($values['id'] ?? 0);
|
||||
$titleText = $isOwnAccount ? t('My account') : t('Edit user');
|
||||
@@ -160,6 +160,8 @@ if ($lastLoginAt !== '') {
|
||||
$customFieldDefinitionsByTenant = $customFieldDefinitionsByTenant ?? [];
|
||||
$customFieldValueMap = $customFieldValueMap ?? [];
|
||||
$customFieldPostedValues = $customFieldPostedValues ?? [];
|
||||
$passwordMinLength = $passwordMinLength ?? 12;
|
||||
$passwordHints = $passwordHints ?? [];
|
||||
require __DIR__ . '/_form.phtml';
|
||||
?>
|
||||
<?php if ($canManageApiTokens ?? false): ?>
|
||||
|
||||
Reference in New Issue
Block a user