diff --git a/wp-admin/users.php b/wp-admin/users.php index 4b61e1ed93..6f4eea4dbf 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -57,6 +57,14 @@ case 'adduser': die (__('ERROR: This login is already registered, please choose another one.')); } + /* checking e-mail address */ + if (empty($_POST["email"])) { + die (__("ERROR: please type an e-mail address")); + return false; + } else if (!is_email($_POST["email"])) { + die (__("ERROR: the email address isn't correct")); + return false; + } $user_login = addslashes(stripslashes($user_login)); $pass1 = addslashes(stripslashes($pass1));