...
 
Commits (2)
......@@ -94,6 +94,17 @@ class forgotpassword implements Interfaces\Api, Interfaces\ApiIgnorePam
break;
}
try {
if (!validate_password($_POST['password'])) {
$response['status'] = "error";
$response['message'] = "Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces.";
}
} catch (\Exception $e) {
$response['status'] = "error";
$response['message'] = "Password must have more than 8 characters. Including uppercase, numbers, special characters (ie. !,#,@), and cannot have spaces.";
break;
}
//$user->salt = Core\Security\Password::salt();
$user->password = Core\Security\Password::generate($user, $_POST['password']);
$user->password_reset_code = "";
......