Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

#4939 closed enhancement (fixed)

bp_core_validate_user_signup - error message improvements

Reported by: hnla's profile hnla Owned by: boonebgorges's profile 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.

Attachments (1)

registration-error-messages-01.patch (996 bytes) - added by hnla 12 years ago.
Updated registration error messages

Download all attachments as: .zip

Change History (3)

@hnla
12 years ago

Updated registration error messages

#1 @boonebgorges
12 years ago

  • Milestone changed from Awaiting Review to 1.8

Good call. Let's do something like this for 1.8.

#2 @boonebgorges
12 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 7163:

Provide more specific feedback for username errors during registration

  • Distinguish between usernames that contain invalid characters and those that are blacklisted
  • Provide a more accurate list of characters allowed in usernames

Fixes #4939

Props hnla

Note: See TracTickets for help on using tickets.