Changeset 3011 for trunk/wp-includes/registration-functions.php
- Timestamp:
- 11/07/2005 09:56:03 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/registration-functions.php
r2995 r3011 4 4 global $wpdb; 5 5 $username = sanitize_user( $username ); 6 $query = "SELECT user_login FROM $wpdb->users WHERE user_login = '$username'"; 7 $query = apply_filters('username_exists', $query); 8 return $wpdb->get_var( $query ); 6 $user = get_userdatabylogin($username); 7 if ( $user ) 8 return $user->user_login; 9 10 return null; 9 11 } 10 12 … … 50 52 } 51 53 52 clean_user_cache($user_id);53 clean_user_cache($user_login);54 55 54 update_usermeta( $user_id, 'first_name', $first_name); 56 55 update_usermeta( $user_id, 'last_name', $last_name); … … 70 69 $user->set_role(get_settings('default_role')); 71 70 } 71 72 wp_cache_delete($user_id, 'users'); 73 wp_cache_delete($user_login, 'users'); 72 74 73 75 if ( $update )
Note: See TracChangeset
for help on using the changeset viewer.