mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
password length verification
This commit is contained in:
parent
b82899e557
commit
878d239538
7 changed files with 31 additions and 0 deletions
|
@ -53,6 +53,12 @@ if ($_SESSION['user'] == 'admin') {
|
|||
$_SESSION['error_msg'] = _('Field "%s" can not be blank.',$error_msg);
|
||||
}
|
||||
|
||||
// Check password length
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$pw_len = strlen($_POST['v_password']);
|
||||
if ($pw_len < 6 ) $_SESSION['error_msg'] = _('Password is too short.',$error_msg);
|
||||
}
|
||||
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
exec (VESTA_CMD."v-add-user ".$v_username." ".$v_password." ".$v_email." ".$v_package." ".$v_fname." ".$v_lname, $output, $return_var);
|
||||
if ($return_var != 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue