registration reason cont...

This commit is contained in:
Mike Macgirvin 2024-06-10 06:04:25 +10:00
parent fc54a6c93b
commit 3426b36049
2 changed files with 7 additions and 1 deletions

View file

@ -4,6 +4,7 @@ namespace Code\Module\Admin;
use App;
use Code\Lib\Account;
use Code\Lib\AConfig;
use Code\Lib\Channel;
use Code\Lib\Time;
use Code\Render\Theme;
@ -131,6 +132,11 @@ class Accounts
"SELECT account.*, register.hash from account left join register on account_id = register.uid where (account_flags & %d ) != 0 ",
intval(ACCOUNT_PENDING)
);
if ($pending) {
for ($count = 0; $count < count($pending); $count++) {
$pending[$count]['reason'] = AConfig::Get($pending[$count]['account_id'], 'register', 'reason', '');
}
}
/* get accounts */

View file

@ -138,7 +138,7 @@ class Register extends Controller
set_aconfig($result['account']['account_id'], 'register', 'permissions_role', $_REQUEST['permissions_role']);
}
if ($_REQUEST['reason']) {
set_aconfig($result['account']['account_id'], 'register', 'reason', trim(escape_tags($_REQUEST['reason'])));
set_aconfig($result['account']['account_id'], 'register', 'reason', substr(trim(escape_tags($_REQUEST['reason'])),0, 500));
}
// At this point the account has been created without error. Purge any error messages from prior failed registration