Tagged: Username changer
Hi, awesome plugin!
I have used this code to disallow space in username change
/** * Validate user name * * @param WP_Error $error Error object. * @param string $new_user_name New user name. * * @return string */ function buddydev_validate_user_name( $error, $new_user_name ) { if ( $error->has_errors() ) { return $error; } if ( preg_match('/\s/',$new_user_name ) ) { $error->add( 'contains_spaces', __( 'User name can not have space in it' ) ); } return $error; } add_filter( 'bp_username_changer_validation_errors', 'buddydev_validate_user_name', 10, 2 );
However, there are no error messages shown to the user if he/she uses a space in the username.
Also, how do I remove the header “Change Username” from the settings page? Thank you!!
Cheers,
DerrickHello Derrick,
I have tested this plugin and it is working fine for me. Are you able to see other feedback messages?.
This issue is coming probably with your custom theme. Please try after switching to the default WordPress theme. Also, let me know which template pack you are using i.e. Nouveau or Legacy.Regards
Ravi
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.
This topic is: not resolved