mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632. git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -44,7 +44,8 @@ function edit_user( $user_id = 0 ) {
|
||||
$user->user_login = sanitize_user( $_POST['user_login'], true );
|
||||
}
|
||||
|
||||
$pass1 = $pass2 = '';
|
||||
$pass1 = '';
|
||||
$pass2 = '';
|
||||
if ( isset( $_POST['pass1'] ) ) {
|
||||
$pass1 = $_POST['pass1'];
|
||||
}
|
||||
@@ -201,8 +202,11 @@ function edit_user( $user_id = 0 ) {
|
||||
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an email address.' ), array( 'form-field' => 'email' ) );
|
||||
} elseif ( ! is_email( $user->user_email ) ) {
|
||||
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) );
|
||||
} elseif ( ( $owner_id = email_exists( $user->user_email ) ) && ( ! $update || ( $owner_id != $user->ID ) ) ) {
|
||||
$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) );
|
||||
} else {
|
||||
$owner_id = email_exists( $user->user_email );
|
||||
if ( $owner_id && ( ! $update || ( $owner_id != $user->ID ) ) ) {
|
||||
$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user