Hi Fellow Copperminers!
I have a problem. I need to prevent obscene usernames from appearing in my Coppermine 1.3.3 "members list." I've tried to prevent such names from appearing by entering them into Coppermine as "banned" users. However, even if a user is banned, their name appears in the Member Llist.
To be sure, I could just delete or ban users who try to register with obscene names; However, I don't want to do that at all. What I need, instead, is to somehow enter or "reserve" obscene names BEFORE any user can register that name and then not have those usernames appear in the Member List. So, is it possible to do this in Coppermine? Is there any way to prevent obscene usernames from appearing in the Member List?
Any constructive advice, comments or ideas are most welcomed!
Charlieos
Your version is highly outdated but well I will help you.
There are several ways to do this, for instance by making a table with all forbidden words in a table, using the banned words from the language file or just directly hardcoded in the register.php file.
I will give an example of the last option, adjust it as you like with a query or any other compare string
find at 411
$user_name = trim(get_post_var('username'));
add after:
if ($user_name == 'badword1' || $user_name == 'badword2') {
$error .= '<li>Username contains banned words';
}
ass you can see the bad word rule can be very long and could be much smaller if you would use an array but I think my post can help you guide into the good direction of how to implement it