Changeset 9474 for extensions/LCAS/trunk
- Timestamp:
- Mar 2, 2011, 1:38:30 PM (14 years ago)
- Location:
- extensions/LCAS/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LCAS/trunk/admin/LCAS_admin.php
r9454 r9474 90 90 91 91 if ((isset($_POST['user-'.$lcas_UserToUpdate])) && ($_POST['user-'.$lcas_UserToUpdate] != '')) { 92 92 93 // Check if username already exists 93 $count = 0;94 94 $lcas_previous_compare_user = LCAS_change_case($_POST['user-'.$lcas_UserToUpdate], $conf_LCAS[0]); 95 foreach ($page['all_users'] as $local_user) 96 { 97 if ($lcas_previous_compare_user == $local_user['transformed']) { 98 $count = 1; 99 break; 100 } 101 } 102 95 96 $LCAS_users = array(); 97 98 // This is a dirty request - Works fine for small number of users but could be unoptimized for large number of users 103 99 $query = ' 104 SELECT username 105 FROM '.USERS_TABLE.' 106 WHERE username="'.addslashes($_POST['user-'.$lcas_UserToUpdate]).'" 107 ;'; 108 109 $count = pwg_db_num_rows(pwg_query($query)); 110 111 if ($count < 1) 100 SELECT '.$conf['user_fields']['username'].' AS username 101 FROM '.USERS_TABLE.';'; 102 103 while ($r = pwg_db_fetch_assoc(pwg_query($query))) 112 104 { 113 // Get old username befor update - Usefull for user notification if is set 105 $LCAS_users[$r['username']] = LCAS_change_case($r['username'], $conf_LCAS[0]); 106 } 107 108 $users_found = array_keys($LCAS_users, $lcas_previous_compare_user); 109 110 if (count($users_found) < 1) 111 { 112 // Get old username before update - Usefull for user notification if is set 114 113 $query =' 115 114 SELECT username -
extensions/LCAS/trunk/main.inc.php
r9470 r9474 26 26 load_language('messages.lang', LCAS_PATH); 27 27 28 $t = pwg_db_fetch_row(pwg_query('29 SELECT `value`30 FROM `'.CONFIG_TABLE.'`31 WHERE `param` = "LoginCaseAccentsSensitivity"32 LIMIT 1;33 '));34 35 $conf['LoginCaseAccentsSensitivity'] = $t[0];36 28 37 29 /* Plugin admin */
Note: See TracChangeset
for help on using the changeset viewer.