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

git-svn-id: http://svn.automattic.com/wordpress/trunk@14265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-04-28 02:20:32 +00:00
parent 3a11c693b7
commit 0e152503cb
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' ) );