mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Added a check for username length
This commit is contained in:
parent
fac9bdf415
commit
882625a279
1 changed files with 5 additions and 0 deletions
|
@ -50,6 +50,11 @@ if (!empty($_POST['ok'])) {
|
||||||
$pw_len = strlen($_POST['v_password']);
|
$pw_len = strlen($_POST['v_password']);
|
||||||
if ($pw_len < 6 ) $_SESSION['error_msg'] = __('Password is too short.',$error_msg);
|
if ($pw_len < 6 ) $_SESSION['error_msg'] = __('Password is too short.',$error_msg);
|
||||||
}
|
}
|
||||||
|
// Check username length
|
||||||
|
if (empty($_SESSION['error_msg'])) {
|
||||||
|
$username_len = strlen($_POST['v_username']);
|
||||||
|
if ($username_len > 12) $_SESSION['error_msg'] = __('Username is too long. Maximum 12 characters', $error_msg);
|
||||||
|
}
|
||||||
|
|
||||||
// Protect input
|
// Protect input
|
||||||
$v_username = escapeshellarg($_POST['v_username']);
|
$v_username = escapeshellarg($_POST['v_username']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue