major update

This commit is contained in:
2026-03-04 15:56:58 +01:00
parent 16759a2732
commit 8f4dd5840d
478 changed files with 24313 additions and 8201 deletions

View File

@@ -6,12 +6,11 @@
* @var array $user
*/
use MintyPHP\Service\User\UserServicesFactory;
use MintyPHP\Session;
$values = $form;
$avatarUuid = (string) ($values['uuid'] ?? '');
$userAvatarService = (new UserServicesFactory())->createUserAvatarService();
$userAvatarService = app(\MintyPHP\Service\User\UserAvatarService::class);
$hasAvatar = $avatarUuid !== '' && $userAvatarService->hasAvatar($avatarUuid);
$currentUserId = (int) ($_SESSION['user']['id'] ?? 0);
$isOwnAccount = $currentUserId > 0 && $currentUserId === (int) ($values['id'] ?? 0);
@@ -115,17 +114,10 @@ if ($lastLoginAt !== '') {
require templatePath('partials/app-details-titlebar.phtml');
?>
<?php if (!empty($errors)): ?>
<div class="app-details-errors">
<div class="notice" data-variant="error">
<ul>
<?php foreach ($errors as $error): ?>
<li><?php e($error); ?></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php endif; ?>
<?php
$validationSummaryErrors = $validationSummaryErrors ?? ($errors ?? []);
require templatePath('partials/app-details-validation-summary.phtml');
?>
<?php
$passwordRequired = false;
@@ -178,7 +170,8 @@ if ($lastLoginAt !== '') {
method="post"
action="admin/users/forget-tokens/<?php e($values['uuid'] ?? ''); ?>"
hidden
onsubmit="return confirm('<?php e(t('Clear all login tokens for this user?')); ?>');"
data-detail-confirm-message="<?php e(t('Clear all login tokens for this user?')); ?>"
data-detail-action-kind="danger"
>
<?php Session::getCsrfInput(); ?>
</form>
@@ -189,7 +182,8 @@ if ($lastLoginAt !== '') {
method="post"
action="admin/users/delete/<?php e($values['uuid'] ?? ''); ?>"
hidden
onsubmit="return confirm('<?php e(t('Delete this user?')); ?>');"
data-detail-confirm-message="<?php e(t('Delete this user?')); ?>"
data-detail-action-kind="delete"
>
<?php Session::getCsrfInput(); ?>
</form>