Move "User::deny()" to own method and update usages

This commit is contained in:
nupplaPhil 2020-02-21 23:03:33 +01:00
parent 6aee153bbd
commit b4f6e8fda1
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
4 changed files with 49 additions and 35 deletions

View file

@ -81,14 +81,18 @@ class Users extends BaseAdmin
if (!empty($_POST['page_users_approve'])) {
require_once 'mod/regmod.php';
foreach ($pending as $hash) {
User::allow($hash);
if (User::allow($hash)) {
info(DI::l10n()->t('Account approved.'));
}
}
}
if (!empty($_POST['page_users_deny'])) {
require_once 'mod/regmod.php';
foreach ($pending as $hash) {
user_deny($hash);
if (User::deny($hash)) {
notice(DI::l10n()->t('Registration revoked'));
}
}
}