Changeset 18513
- Timestamp:
- 08/05/2011 04:57:31 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
trunk/wp-admin/includes/schema.php
r17928 r18513 646 646 $errors->add( 'siteid_exists', __( 'The network already exists.' ) ); 647 647 648 $site_user = get_user_by _email($email );648 $site_user = get_user_by( 'email', $email ); 649 649 if ( ! is_email( $email ) ) 650 650 $errors->add( 'invalid_email', __( 'You must provide a valid e-mail address.' ) ); -
trunk/wp-includes/capabilities.php
r18512 r18513 448 448 $this->data = get_userdata( $id ); 449 449 else 450 $this->data = get_user databylogin($name );450 $this->data = get_user_by('login', $name ); 451 451 452 452 if ( empty( $this->data->ID ) ) -
trunk/wp-includes/pluggable-deprecated.php
r14090 r18513 37 37 endif; 38 38 39 if ( !function_exists('get_userdatabylogin') ) : 40 /** 41 * Retrieve user info by login name. 42 * 43 * @since 0.71 44 * @deprecated 2.5 45 * @deprecated Use get_user_by('login') 46 * 47 * @param string $user_login User's username 48 * @return bool|object False on failure, User DB row object 49 */ 50 function get_userdatabylogin($user_login) { 51 _deprecated_function( __FUNCTION__, '3.3', "get_user_by('login')" ); 52 return get_user_by('login', $user_login); 53 } 54 endif; 55 56 if ( !function_exists('get_user_by_email') ) : 57 /** 58 * Retrieve user info by email. 59 * 60 * @since 2.5 61 * @deprecated 2.5 62 * @deprecated Use get_user_by('email') 63 * 64 * @param string $email User's email address 65 * @return bool|object False on failure, User DB row object 66 */ 67 function get_user_by_email($email) { 68 _deprecated_function( __FUNCTION__, '3.3', "get_user_by('email')" ); 69 return get_user_by('email', $email); 70 } 71 endif; 72 39 73 if ( !function_exists('wp_setcookie') ) : 40 74 /** … … 55 89 function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { 56 90 _deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' ); 57 $user = get_user databylogin($username);91 $user = get_user_by('login', $username); 58 92 wp_set_auth_cookie($user->ID, $remember); 59 93 } -
trunk/wp-includes/pluggable.php
r18504 r18513 200 200 201 201 return $user; 202 }203 endif;204 205 if ( !function_exists('get_userdatabylogin') ) :206 /**207 * Retrieve user info by login name.208 *209 * @since 0.71210 *211 * @param string $user_login User's username212 * @return bool|object False on failure, User DB row object213 */214 function get_userdatabylogin($user_login) {215 return get_user_by('login', $user_login);216 }217 endif;218 219 if ( !function_exists('get_user_by_email') ) :220 /**221 * Retrieve user info by email.222 *223 * @since 2.5224 *225 * @param string $email User's email address226 * @return bool|object False on failure, User DB row object227 */228 function get_user_by_email($email) {229 return get_user_by('email', $email);230 202 } 231 203 endif; … … 595 567 } 596 568 597 $user = get_user databylogin($username);569 $user = get_user_by('login', $username); 598 570 if ( ! $user ) { 599 571 do_action('auth_cookie_bad_username', $cookie_elements); -
trunk/wp-includes/post.php
r18500 r18513 3396 3396 //Do we have an author id or an author login? 3397 3397 if ( 0 == intval($post_author) ) { 3398 $post_author = get_user databylogin($post_author);3398 $post_author = get_user_by('login', $post_author); 3399 3399 if ( empty($post_author) ) 3400 3400 continue; -
trunk/wp-includes/user.php
r18504 r18513 1297 1297 */ 1298 1298 function username_exists( $username ) { 1299 if ( $user = get_user databylogin($username ) ) {1299 if ( $user = get_user_by('login', $username ) ) { 1300 1300 return $user->ID; 1301 1301 } else { … … 1314 1314 */ 1315 1315 function email_exists( $email ) { 1316 if ( $user = get_user_by _email($email) )1316 if ( $user = get_user_by('email', $email) ) 1317 1317 return $user->ID; 1318 1318 -
trunk/wp-login.php
r18504 r18513 172 172 173 173 if ( strpos($_POST['user_login'], '@') ) { 174 $user_data = get_user_by _email(trim($_POST['user_login']));174 $user_data = get_user_by('email', trim($_POST['user_login'])); 175 175 if ( empty($user_data) ) 176 176 $errors->add('invalid_email', __('<strong>ERROR</strong>: There is no user registered with that email address.')); 177 177 } else { 178 178 $login = trim($_POST['user_login']); 179 $user_data = get_user databylogin($login);179 $user_data = get_user_by('login', $login); 180 180 } 181 181 … … 545 545 if ( !empty($_POST['log']) && !force_ssl_admin() ) { 546 546 $user_name = sanitize_user($_POST['log']); 547 if ( $user = get_user databylogin($user_name) ) {547 if ( $user = get_user_by('login', $user_name) ) { 548 548 if ( get_user_option('use_ssl', $user->ID) ) { 549 549 $secure_cookie = true; -
trunk/wp-mail.php
r14924 r18513 114 114 if ( is_email($author) ) { 115 115 echo '<p>' . sprintf(__('Author is %s'), $author) . '</p>'; 116 $userdata = get_user_by _email($author);116 $userdata = get_user_by('email', $author); 117 117 if ( empty($userdata) ) { 118 118 $author_found = false;
Note: See TracChangeset
for help on using the changeset viewer.