yes, because priority is given to the message “This username is invalid because it uses illegal characters”, if the username contains unauthorized characters then priority has this error.
-
This reply was modified 1 year, 10 months ago by
Benaceur.
Thanks for the quick response.
I forgot to mention that this is not the case. Otherwise I wouldn’t have started this thread.
Let’s say I set the length to a minimum of 3 and a maximum of 24 and then try a 10-letter username without any special characters whatsoever, it will still return the invalid character error message.
I should also mention that this is a BuddyBoss install which already overrides some of the error messages defined in the plugin.
I’m 100% sure that this used to work correctly before though.
I did some more testing and it’s actually BuddyBoss Platform itself that is causing the issue. Once deactivated the correct error message will show. We will have to look into this with their support team.
Please let me know if you should come up with anything in the meantime.
Thanks much!
I will fix this problem in the next version of the plugin.
for the moment edit this file:
wp-content\plugins\restrict-usernames-emails-characters\classes\classe_val.php
and to the lines 86-87 replace this:
$__valid = $this->mu() || $_bp_signup_username ? true : $valid;
$_valid = $this->mu() || $_bp_signup_username ? $valid = true : $valid = false;
by:
$__valid = $this->mu() || $this->bp() ? true : $valid;
$_valid = $this->mu() || $this->bp() ? $valid = true : $valid = false;
-
This reply was modified 1 year, 10 months ago by
Benaceur.
Thank you for looking into this. Your help is much appreciated. Looking forward to the new release.
Hi,
Replacing those lines seems to have fixed that particular issue.
I’ve come across some other (related) problems however.
================
Instead of what is set in the plugin I’m getting the default BuddyBoss/BuddyPress error messages for the following scenarios:
Username too short:
[1 character] = “Username must be at least 3 characters” (BuddyBoss)
[2 characters] = “Username must be at least 3 characters” (BuddyBoss)
[3 characters] = “Username must be at least 5 characters.” (plugin)
[4 characters] = “Username must be at least 5 characters.” (plugin)
Username too long:
[16 characters] = “Username may not be longer than 15 characters.” (plugin)
[32 characters] = “Username may not be longer than 15 characters.” (plugin)
[33 characters] = “Username must be shorter than 32 characters.” (BuddyBoss)
[34 characters] = “Username must be shorter than 32 characters.” (BuddyBoss)
Username empty:
[0 characters] = “This is a required field.” (BuddyBoss)
================
Here are more but I realized that there are no options for name and empty password fields in the plugin, even though that would actually be a useful addition.
Name too long:
[33 characters] = “Name must be shorter than 32 characters.” (BuddyBoss)
[34 characters] = “Name must be shorter than 32 characters.” (BuddyBoss)
Name empty:
[0 characters] = “This is a required field.” (BuddyBoss)
Password empty:
[0 characters] = “Please make sure to enter your password.” (BuddyBoss)
[0 characters] = “Please make sure to enter your password twice.” (BuddyBoss)
================
At least in the case of BuddyBoss/BuddyPress the plugin doesn’t seem to successfully overwrite the default error messages.
In fact only the email field seems to be working correctly for both empty and existing values.
I would very much appreciate if you could look into this. I can’t be the only one having these issues.
Thank you!
I will fix compatibility issues with buddyBoss in the next release.
note: my plugin is based on the username (in BuddyBoss Nickname) and email in the process of registering a new member or updating a user’s profile, and not other fields like password and other …