diff --git a/src/Module/Admin/Accounts.php b/src/Module/Admin/Accounts.php index 9b64fddc8..06e73be06 100644 --- a/src/Module/Admin/Accounts.php +++ b/src/Module/Admin/Accounts.php @@ -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 */ diff --git a/src/Module/Register.php b/src/Module/Register.php index 1a78c3c55..6c1afaeba 100644 --- a/src/Module/Register.php +++ b/src/Module/Register.php @@ -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