Make WordPress Core


Ignore:
Timestamp:
11/07/2005 09:56:03 PM (19 years ago)
Author:
ryan
Message:

Object caching, round one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/registration-functions.php

    r2995 r3011  
    44    global $wpdb;
    55    $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;
    911}
    1012
     
    5052    }
    5153   
    52     clean_user_cache($user_id);
    53     clean_user_cache($user_login);
    54 
    5554    update_usermeta( $user_id, 'first_name', $first_name);
    5655    update_usermeta( $user_id, 'last_name', $last_name);
     
    7069        $user->set_role(get_settings('default_role'));
    7170    }
     71
     72    wp_cache_delete($user_id, 'users');
     73    wp_cache_delete($user_login, 'users');
    7274   
    7375    if ( $update )
Note: See TracChangeset for help on using the changeset viewer.