Changeset 23307 for trunk/wp-includes/ms-functions.php
- Timestamp:
- 01/18/2013 03:30:55 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-functions.php
r23107 r23307 910 910 * @return mixed Returns false on failure, or int $user_id on success 911 911 */ 912 function wpmu_create_user( $user_name, $password, $email ) {912 function wpmu_create_user( $user_name, $password, $email ) { 913 913 $user_name = preg_replace( '/\s+/', '', sanitize_user( $user_name, true ) ); 914 914 915 915 $user_id = wp_create_user( $user_name, $password, $email ); 916 if ( is_wp_error( $user_id) )916 if ( is_wp_error( $user_id ) ) 917 917 return false; 918 918 919 $user = new WP_User( $user_id ); 920 919 921 // Newly created users have no roles or caps until they are added to a blog. 920 delete_user_option( $user_id, 'capabilities');922 delete_user_option( $user_id, $user->cap_key ); 921 923 delete_user_option( $user_id, 'user_level' ); 922 924
Note: See TracChangeset
for help on using the changeset viewer.