Changeset 7382 for trunk/bp-members/bp-members-functions.php
- Timestamp:
- 09/17/2013 01:57:48 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-functions.php
r7348 r7382 1188 1188 $errors->add( 'user_name', __( 'That username is not allowed', 'buddypress' ) ); 1189 1189 1190 if ( ! validate_username( $user_name ) ) 1191 $errors->add( 'user_name', __( 'Usernames can contain only letters, numbers, ., -, *, and @', 'buddypress' ) ); 1190 if ( ! validate_username( $user_name ) ) { 1191 // Check for capital letters when on multisite. 1192 // 1193 // If so, throw a different error message. 1194 // @see #5175 1195 if ( is_multisite() ) { 1196 $match = array(); 1197 preg_match( '/[A-Z]/', $user_name, $match ); 1198 1199 if ( ! empty( $match ) ) { 1200 $errors->add( 'user_name', __( 'Username must be in lowercase characters.', 'buddypress' ) ); 1201 } 1202 1203 } else { 1204 $errors->add( 'user_name', __( 'Usernames can contain only letters, numbers, ., -, *, and @', 'buddypress' ) ); 1205 } 1206 } 1192 1207 1193 1208 if( strlen( $user_name ) < 4 )
Note: See TracChangeset
for help on using the changeset viewer.