Ticket #33759: 33579.patch
File 33579.patch, 1.3 KB (added by , 8 years ago) |
---|
-
wp-includes/user-functions.php
1330 1330 */ 1331 1331 if ( in_array( $user_login, apply_filters( 'illegal_user_logins', array() ) ) ) { 1332 1332 return new WP_Error( 'illegal_user_login', __( 'Sorry, that username is not allowed.' ) ); 1333 } 1333 } 1334 1334 1335 1335 /* 1336 1336 * If a nicename is provided, remove unsafe user characters before using it. … … 1636 1636 * @param array $userdata The updated user array. 1637 1637 * 1638 1638 */ 1639 $send_password_change_email = apply_filters( 'send_password_change_email', true, $user, $userdata );1639 $send_password_change_email = apply_filters( 'send_password_change_email', ! current_user_can( 'manage_options' ), $user, $userdata ); 1640 1640 } 1641 1641 1642 1642 if ( isset( $userdata['user_email'] ) && $user['user_email'] !== $userdata['user_email'] ) { … … 1652 1652 * @param array $userdata The updated user array. 1653 1653 * 1654 1654 */ 1655 $send_email_change_email = apply_filters( 'send_email_change_email', true, $user, $userdata );1655 $send_email_change_email = apply_filters( 'send_email_change_email', ! current_user_can( 'manage_options' ), $user, $userdata ); 1656 1656 } 1657 1657 1658 1658 wp_cache_delete( $user['user_email'], 'useremail' );