Changeset 8643 for extensions
- Timestamp:
- Jan 13, 2011, 10:45:32 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LCAS/trunk/include/functions.inc.php
r8638 r8643 29 29 * $conf['insensitive_case_logon'] and $conf['LCAS_replacement_set']. 30 30 * 31 * @param mix s: string , or array of strings, to evaluate32 * 33 * @return : string , or array of strings,modified as stated31 * @param mix s: string 32 * 33 * @return : string modified as stated 34 34 */ 35 35 function LCAS_change_case($Username, $Opt, $At_login=true) … … 283 283 { 284 284 $user = $row; 285 $user['transformed'] = LCAS_change_case($user['username'], $rule );285 $user['transformed'] = LCAS_change_case($user['username'], $rule, false); 286 286 array_push($users, $user); 287 287 } … … 320 320 * 321 321 */ 322 function LCAS_SearchCaseUsername($username, $rule )322 function LCAS_SearchCaseUsername($username, $rule, $At_login=true) 323 323 { 324 324 global $conf; 325 325 326 $username_c = LCAS_change_case($username, $rule );326 $username_c = LCAS_change_case($username, $rule, $At_login); 327 327 328 328 if (isset($username)) … … 335 335 "); 336 336 while ($r = pwg_db_fetch_assoc($q)) 337 $LCAS_users[$r['username']] = LCAS_change_case($r['username'], $rule); 338 // $LCAS_users is now an associative table where the key is the account as 339 // registered in the DB, and the value is this same account, in lower case 337 $LCAS_users[$r['username']] = 338 LCAS_change_case($r['username'], $rule, $At_login); 339 // $LCAS_users is now an associative table where the key is the account 340 // as registered in the DB, and the value is this same account, 341 // transformed as stated by $rule. 340 342 341 343 $users_found = array_keys($LCAS_users, $username_c); 342 344 // $users_found is now a table of which the values are all the accounts 343 // which can be written in lowercase the same way as $username344 if (count($users_found) != 1) // If ambiguous, don't allow lowercase writing345 return $username; // but normal writing will work345 // which can be written as stated by $rule the same way as $username can 346 if (count($users_found) != 1) // If ambiguous, don't allow transformed 347 return $username; // writing but normal writing will work 346 348 else 347 349 return $users_found[0];
Note: See TracChangeset
for help on using the changeset viewer.