Opened 12 years ago
Closed 12 years ago
#4939 closed enhancement (fixed)
bp_core_validate_user_signup - error message improvements
Reported by: | hnla | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 1.8 | Priority: | normal |
Severity: | minor | Version: | 1.7 |
Component: | Core | Keywords: | has-patch |
Cc: |
Description
When signing up username validation errors could be improved.
Example: if attempting to use an illegal_name() i.e from WP site_option('illegal_names') or trying to use a BP reserved word 'activity' the message shown is 'please use lowercase letters and numbers only' or approx.
WP does in fact allow uppercase characters and BP accepts them as such so instruction to use lowercase misleading.
WP also allows for a series of characters as determined by: sanitize_user( $username, $strict )
returns
( _, space, ., -, *, and @ )
BP prevents the use of underscores however.
BP also accepts spaces in names (as WP allows) but strips them and adds a hyphen, this is an issue as user not aware this has occurred and can't log in (a known problem not easy to deal with on registration but perhaps a text message in place beneath input alerting to fact? or a function to check user_name for spaces as we do with underscores and return message.)
Patch returned attempts to update error messages by splitting them and adding check for illegal_names with message specific message for reserved names.
Then runs check for WP validate_username and returns updated message including allowed characters minus the 'space' mention.
Text strings will doubtless take improvement.
Updated registration error messages