Fix Admin page
This commit is contained in:
parent
4f2bea5cb1
commit
0fade7fc0a
1 changed files with 7 additions and 5 deletions
|
@ -47,7 +47,7 @@ class Users extends BaseAdmin
|
||||||
|
|
||||||
if ($nu_name !== '' && $nu_email !== '' && $nu_nickname !== '') {
|
if ($nu_name !== '' && $nu_email !== '' && $nu_nickname !== '') {
|
||||||
try {
|
try {
|
||||||
DI::userService()->createMinimal($nu_name, $nu_email, $nu_nickname, $nu_language);
|
User::createMinimal($nu_name, $nu_email, $nu_nickname, $nu_language);
|
||||||
} catch (\Exception $ex) {
|
} catch (\Exception $ex) {
|
||||||
notice($ex->getMessage());
|
notice($ex->getMessage());
|
||||||
return;
|
return;
|
||||||
|
@ -55,15 +55,17 @@ class Users extends BaseAdmin
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['page_users_block'])) {
|
if (!empty($_POST['page_users_block'])) {
|
||||||
if (User::block($users)) {
|
foreach ($users as $uid) {
|
||||||
notice(DI::l10n()->tt('%s user blocked', '%s users blocked', count($users)));
|
User::block(Register::getPendingForUser($uid)['hash'] ?? '');
|
||||||
}
|
}
|
||||||
|
notice(DI::l10n()->tt('%s user blocked', '%s users blocked', count($users)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['page_users_unblock'])) {
|
if (!empty($_POST['page_users_unblock'])) {
|
||||||
if (User::block($users, false)) {
|
foreach ($users as $uid) {
|
||||||
notice(DI::l10n()->tt('%s user unblocked', '%s users unblocked', count($users)));
|
User::block(Register::getPendingForUser($uid)['hash'] ?? '', false);
|
||||||
}
|
}
|
||||||
|
notice(DI::l10n()->tt('%s user unblocked', '%s users unblocked', count($users)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($_POST['page_users_delete'])) {
|
if (!empty($_POST['page_users_delete'])) {
|
||||||
|
|
Loading…
Reference in a new issue