Changeset 34354
- Timestamp:
- 09/20/2015 09:10:59 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user-functions.php
r34318 r34354 137 137 $user = get_user_by('login', $username); 138 138 139 if ( !$user ) 140 return new WP_Error( 'invalid_username', sprintf( __( '<strong>ERROR</strong>: Invalid username. <a href="%s">Lost your password?</a>' ), wp_lostpassword_url() ) ); 139 if ( !$user ) { 140 return new WP_Error( 'invalid_username', 141 __( '<strong>ERROR</strong>: Invalid username.' ) . 142 ' <a href="' . wp_lostpassword_url() . '">' . 143 __( 'Lost your password?' ) . 144 '</a>' 145 ); 146 } 141 147 142 148 /** … … 153 159 return $user; 154 160 155 if ( !wp_check_password($password, $user->user_pass, $user->ID) ) 156 return new WP_Error( 'incorrect_password', sprintf( __( '<strong>ERROR</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s">Lost your password?</a>' ), 157 $username, wp_lostpassword_url() ) ); 161 if ( ! wp_check_password( $password, $user->user_pass, $user->ID ) ) { 162 return new WP_Error( 'incorrect_password', 163 sprintf( 164 /* translators: %s: user name */ 165 __( '<strong>ERROR</strong>: The password you entered for the username %s is incorrect.' ), 166 '<strong>' . $username . '</strong>' 167 ) . 168 ' <a href="' . wp_lostpassword_url() . '">' . 169 __( 'Lost your password?' ) . 170 '</a>' 171 ); 172 } 158 173 159 174 return $user;
Note: See TracChangeset
for help on using the changeset viewer.