Changeset 2752 for branches/1.2/bp-core/bp-core-wpabstraction.php
- Timestamp:
- 02/20/2010 12:34:32 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-core/bp-core-wpabstraction.php
r2349 r2752 97 97 $errors = new WP_Error(); 98 98 99 $user_name = preg_replace( "/\s+/", '', sanitize_user( $user_name, true ) );100 99 $user_email = sanitize_email( $user_email ); 101 100 … … 106 105 preg_match( "/[a-z0-9]+/", $user_name, $maybe ); 107 106 108 if( $user_name != $maybe[0] ) {109 $errors->add('user_name', __("Only lowercase letters and numbers allowed"));110 }111 112 107 $illegal_names = get_site_option( "illegal_names" ); 113 108 if( is_array( $illegal_names ) == false ) { … … 115 110 add_site_option( "illegal_names", $illegal_names ); 116 111 } 117 if( in_array( $user_name, $illegal_names ) == true ) { 118 $errors->add('user_name', __("That username is not allowed")); 112 113 if ( !validate_username( $user_name ) || in_array( $user_name, $illegal_names ) == true || $user_name != $maybe[0] ) { 114 $errors->add('user_name', __("Only lowercase letters and numbers allowed")); 119 115 } 120 116
Note: See TracChangeset
for help on using the changeset viewer.