WordPress.org

Plugin Directory

Changeset 563833


Ignore:
Timestamp:
06/26/12 01:24:35 (22 months ago)
Author:
cnorris23
Message:

Don't stomp out the $user object containing updated info

See http://wordpress.org/support/topic/plugin-edit-author-slug-cant-update-user-role-after-update-to-091

File:
1 edited

Legend:

Unmodified
Added
Removed
  • edit-author-slug/trunk/includes/admin-functions.php

    r557753 r563833  
    129129 
    130130    // Validate the user object 
    131     $user = get_userdata( $user_id ); 
     131    $_user = get_userdata( $user_id ); 
    132132 
    133133    // Check for a custom author slug 
     
    153153 
    154154    // Maybe update the author slug? 
    155     if ( $author_slug != $user->user_nicename ) { 
     155    if ( $author_slug != $_user->user_nicename ) { 
    156156 
    157157        // Add the wpdb global only when necessary 
     
    178178 
    179179        // We're still here, so clear the cache for good measure 
    180         wp_cache_delete( $user->user_nicename, 'userslugs' ); 
     180        wp_cache_delete( $_user->user_nicename, 'userslugs' ); 
    181181    } 
    182182} 
Note: See TracChangeset for help on using the changeset viewer.