Changeset 10939 for branches/2.6/src/bp-members/bp-members-functions.php
- Timestamp:
- 07/06/2016 05:00:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.6/src/bp-members/bp-members-functions.php
r10825 r10939 2066 2066 } 2067 2067 2068 // Update the display_name. 2069 wp_update_user( array( 2070 'ID' => $user_id, 2071 'display_name' => bp_core_get_user_displayname( $user_id ), 2072 ) ); 2073 2074 // Set the password on multisite installs. 2068 // Replace the password automatically generated by WordPress by the one the user chose. 2075 2069 if ( ! empty( $user['meta']['password'] ) ) { 2076 2070 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_pass = %s WHERE ID = %d", $user['meta']['password'], $user_id ) ); 2071 2072 /** 2073 * Make sure to clean the user's cache as we've 2074 * directly edited the password without using 2075 * wp_update_user(). 2076 * 2077 * If we can't use wp_update_user() that's because 2078 * we already hashed the password at the signup step. 2079 */ 2080 $uc = wp_cache_get( $user_id, 'users' ); 2081 2082 if ( ! empty( $uc->ID ) ) { 2083 clean_user_cache( $uc->ID ); 2084 } 2077 2085 } 2078 2086
Note: See TracChangeset
for help on using the changeset viewer.