mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
add check to prevent user creation with an id with trailing spaces
This commit is contained in:
parent
d16ecc54b6
commit
ec6a763aa2
@ -243,6 +243,12 @@ if ($create_user) {
|
|||||||
$password_new = '';
|
$password_new = '';
|
||||||
$password_confirm = '';
|
$password_confirm = '';
|
||||||
$new_user = true;
|
$new_user = true;
|
||||||
|
} else if (preg_match('/\s+$/', io_safe_output($id))) {
|
||||||
|
ui_print_error_message(__('Invalid user ID: trailing blank spaces not allowed'));
|
||||||
|
$user_info = $values;
|
||||||
|
$password_new = '';
|
||||||
|
$password_confirm = '';
|
||||||
|
$new_user = true;
|
||||||
} else if ($password_new == '') {
|
} else if ($password_new == '') {
|
||||||
ui_print_error_message(__('Passwords cannot be empty'));
|
ui_print_error_message(__('Passwords cannot be empty'));
|
||||||
$user_info = $values;
|
$user_info = $values;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user