Poka yoke for username sanitization during install. see #13159.

git-svn-id: https://develop.svn.wordpress.org/trunk@14265 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-04-28 02:20:32 +00:00
parent da1170a530
commit 3114dfddce
1 changed files with 3 additions and 0 deletions

View File

@ -193,6 +193,9 @@ switch($step) {
// TODO: poka-yoke
display_setup_form( __('you must provide a valid username.') );
$error = true;
} elseif ( $user_name != sanitize_user( $user_name, true ) ) {
display_setup_form( __('the username you provided has invalid characters.') );
$error = true;
} elseif ( $admin_password != $admin_password_check ) {
// TODO: poka-yoke
display_setup_form( __( 'your passwords do not match. Please try again' ) );