mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +00:00
Move "regmod" functionality into Admin Users page
This commit is contained in:
parent
bb47624bf2
commit
4f2bea5cb1
5 changed files with 16 additions and 67 deletions
|
@ -79,7 +79,6 @@ class Users extends BaseAdmin
|
|||
}
|
||||
|
||||
if (!empty($_POST['page_users_approve'])) {
|
||||
require_once 'mod/regmod.php';
|
||||
foreach ($pending as $hash) {
|
||||
if (User::allow($hash)) {
|
||||
info(DI::l10n()->t('Account approved.'));
|
||||
|
@ -88,7 +87,6 @@ class Users extends BaseAdmin
|
|||
}
|
||||
|
||||
if (!empty($_POST['page_users_deny'])) {
|
||||
require_once 'mod/regmod.php';
|
||||
foreach ($pending as $hash) {
|
||||
if (User::deny($hash)) {
|
||||
notice(DI::l10n()->t('Registration revoked'));
|
||||
|
@ -138,6 +136,16 @@ class Users extends BaseAdmin
|
|||
User::block($uid, false);
|
||||
notice(DI::l10n()->t('User "%s" unblocked', $user['username']));
|
||||
break;
|
||||
case 'allow':
|
||||
parent::checkFormSecurityTokenRedirectOnError('/admin/users', 'admin_users', 't');
|
||||
User::allow(Register::getPendingForUser($uid)['hash'] ?? '');
|
||||
notice(DI::l10n()->t('Account approved.'));
|
||||
break;
|
||||
case 'deny':
|
||||
parent::checkFormSecurityTokenRedirectOnError('/admin/users', 'admin_users', 't');
|
||||
User::deny(Register::getPendingForUser($uid)['hash'] ?? '');
|
||||
notice(DI::l10n()->t('Registration revoked'));
|
||||
break;
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('admin/users');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue