From 88b500a273de1c706b96207ff0e4fefac8a07c91 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 11 Feb 2014 06:01:50 -0800 Subject: [PATCH] Should fix #508 - password should allow special chars. --- e107_core/shortcodes/batch/signup_shortcodes.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e107_core/shortcodes/batch/signup_shortcodes.php b/e107_core/shortcodes/batch/signup_shortcodes.php index 623c6be40..292efe23b 100755 --- a/e107_core/shortcodes/batch/signup_shortcodes.php +++ b/e107_core/shortcodes/batch/signup_shortcodes.php @@ -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);