Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Preventing obscene usernames from appearing in the "Member List": Can it be done  (Read 4540 times)

0 Members and 1 Guest are viewing this topic.

Charlieos

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

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
Logged

xplicit

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 214

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
Code: [Select]
$user_name = trim(get_post_var('username'));
add after:

Code: [Select]
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
Logged
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.