Changeset 72 for trunk/preferences
- Timestamp:
- 09/24/07 10:22:29 (17 years ago)
- Location:
- trunk/preferences
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/preferences/changepassword.php
r35 r72 26 26 if(!$GLOBALS['phpgw']->acl->check('changepassword', 1) || $_POST['cancel']) 27 27 { 28 if(($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == '0') && (!$_POST['cancel'])) 29 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=6')); 30 28 31 if ($GLOBALS['phpgw_info']['server']['use_https'] == 1) 29 32 Header('Location: http://' . $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/index.php'); … … 43 46 $GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel')); 44 47 $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/preferences/changepassword.php')); 48 49 if ($_GET['cd'] == 1) 50 { 51 $lang1 = lang('Your password has expired'); 52 $lang2 = lang('You must register a new password'); 53 $GLOBALS['phpgw']->template->set_var('messages',"<font color=red><h1>$lang1.<br>$lang2.</h1></font>"); 54 } 45 55 46 56 if ($GLOBALS['phpgw_info']['server']['auth_type'] != 'ldap') … … 66 76 $errors[] = lang('The two passwords are not the same'); 67 77 } 78 else if ($a_passwd == $n_passwd) 79 { 80 $errors[] = lang('Your old password and your new password are the same. Choose a different new password'); 81 } 68 82 else if (! $n_passwd) 69 83 { … … 75 89 } 76 90 # password that start with a-Z or 0-9 and contain _.-!@#$%&*+=| will be accepted. 77 else if (! ereg ("(^[a-zA-Z0-9_.\-\!@#$%&*+=|]*)$", $n_passwd ) ) 91 //else if (! ereg ("(^[a-zA-Z0-9_.\-\!@#$%&*+=|]*)$", $n_passwd ) ) 92 //else if (! ereg ("(^[a-zA-Z0-9_.\-\!@#$%&*+=|\(\)\^\~\}\{\[\]\/\\\"\'\:\;\?]*)$", $n_passwd ) ) 93 else if (! ereg ("([]^[a-zA-Z0-9\_\.\-\!\@\#\$\%\&\*\+\=\|\(\)\^\~\}\{\/\\\"\'\:\;\?]*)$", $n_passwd ) ) 78 94 { 79 95 $errors[] = lang('Your password contains characters not allowed'); 80 96 } 81 97 # password must contain 2 special letters, numbers or special characters 82 else if ($GLOBALS['phpgw_info']['server']['num_special_letters_userpass'] && ! ereg ("([0-9_.\-!@#$%&*+=|]){".$GLOBALS['phpgw_info']['server']['num_special_letters_userpass'].",}", $n_passwd ) ) 98 //else if ($GLOBALS['phpgw_info']['server']['num_special_letters_userpass'] && ! ereg ("([0-9_.\-!@#$%&*+=|]){".$GLOBALS['phpgw_info']['server']['num_special_letters_userpass'].",}", $n_passwd ) ) 99 //else if ($GLOBALS['phpgw_info']['server']['num_special_letters_userpass'] && ! ereg ("([0-9_.\-!@#$%&*+=|\(\)\^\~\}\{\[\]\/\\\"\'\:\;\?]){".$GLOBALS['phpgw_info']['server']['num_special_letters_userpass']."}", $n_passwd ) ) 100 else if ($GLOBALS['phpgw_info']['server']['num_special_letters_userpass'] && ! ereg ("([][0-9\_\.\-\!\@\#\$\%\&\*\+\=\|\(\)\^\~\}\{\/\\\"\'\:\;\?]){".$GLOBALS['phpgw_info']['server']['num_special_letters_userpass']."}", $n_passwd ) ) 83 101 { 84 102 $errors[] = lang('Your password must contain at least %1 numbers or characters special', $GLOBALS['phpgw_info']['server']['num_special_letters_userpass']);
Note: See TracChangeset
for help on using the changeset viewer.