Changeset 4429
- Timestamp:
- Dec 5, 2009, 8:55:21 PM (14 years ago)
- Location:
- trunk/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/config_default.inc.php
r4357 r4429 325 325 // Define using double password type in admin's users management panel 326 326 $conf['double_password_type_in_admin'] = false; 327 328 // Define if logins must be case sentitive or not at users registration. ie : 329 // If set true, the login "user" will equal "User" or "USER" or "user", 330 // etc. ... And it will be impossible to use such login variation to create a 331 // new user account. 332 $conf['no_case_sensitive_for_login'] = false; 327 333 328 334 // +-----------------------------------------------------------------------+ -
trunk/include/functions_user.inc.php
r4385 r4429 67 67 } 68 68 69 // validate_login_case: 70 // o check if login is not used by a other user 71 // If the login doesn't correspond, an error message is returned. 72 // 73 function validate_login_case($login) 74 { 75 global $conf; 76 77 if (defined("PHPWG_INSTALLED")) 78 { 79 $query = " 80 SELECT ".$conf['user_fields']['username']." 81 FROM ".USERS_TABLE." 82 WHERE LOWER(".stripslashes($conf['user_fields']['username']).") = '".strtolower($login)."' 83 ;"; 84 85 $count = pwg_db_num_rows(pwg_query($query)); 86 87 if ($count > 0) 88 { 89 return l10n('reg_err_login5'); 90 } 91 } 92 } 93 69 94 function register_user($login, $password, $mail_address, 70 95 $with_notification = true, $errors = array()) … … 92 117 { 93 118 array_push($errors, $mail_error); 119 } 120 121 if ($conf['no_case_sensitive_for_login'] == true) 122 { 123 $login_error = validate_login_case($login); 124 if ($login_error != '') 125 { 126 array_push($errors, $login_error); 127 } 94 128 } 95 129
Note: See TracChangeset
for help on using the changeset viewer.