mirror of
https://github.com/e107inc/e107.git
synced 2025-05-08 05:05:28 +02:00
Should fix #508 - password should allow special chars.
This commit is contained in:
parent
7aaf407370
commit
88b500a273
@ -184,7 +184,10 @@ class signup_shortcodes extends e_shortcode
|
||||
// $options['title'] = 'Password must contain at least 6 characters, including UPPER/lowercase and numbers';
|
||||
$len = vartrue(e107::getPref('signup_pass_len'),6);
|
||||
$options['title'] = str_replace("[x]",$len,LAN_SIGNUP_107); // Password must be at least
|
||||
$options['pattern'] = '(?=.*\d)(?=.*[a-z])(?=.*[A-Z])\w{'.$len.',}'; // at least one number, one lowercase and uppercase.
|
||||
// $options['pattern'] = '(?=.*\d)(?=.*[a-z])(?=.*[A-Z])\w{'.$len.',}'; // at least one number, one lowercase and uppercase.
|
||||
$options['required'] = true;
|
||||
$options['pattern'] = '(?=^.{'.$len.',}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$';
|
||||
|
||||
// $options['pattern'] = '\w{'.$len.',}'; // word of minimum length
|
||||
|
||||
return e107::getForm()->password('password1', '', 20, $options);
|
||||
|
Loading…
x
Reference in New Issue
Block a user