Nick name protect

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
qwerty-1
Registered User
Posts: 6
Joined: Tue Aug 09, 2005 6:55 pm

Nick name protect

Post by qwerty-1 »

Hi!
Hi!
Whether there is on a forum a system protection names of users from substitution?
For example to replace some letters in a name with other letters from other coding? Substitution nick?
PS sorry for bad english :evil:
arod-1
Registered User
Posts: 60
Joined: Mon Jun 06, 2005 8:33 pm

Re: Nick name protect

Post by arod-1 »

let me see if i understand correctly:
what you want is a way to guarantee that if you have a user whose nick is, say, "MOON"' to prevent someone else from registerring as "MO0N"?
i am not familiar with such a system, but i think it is a worthy idea.
if i didnt understand correctly, please clarify.
Yawnster
Registered User
Posts: 342
Joined: Sat Jan 29, 2005 9:18 pm
Location: London, UK
Contact:

Re: Nick name protect

Post by Yawnster »

its an idea, but he programming behind that is quite complex because you have to decide when the username is infringing and thats neigh on impossible without judgement..
arod-1
Registered User
Posts: 60
Joined: Mon Jun 06, 2005 8:33 pm

Re: Nick name protect

Post by arod-1 »

i dont think its a complex programming.
all you have to do is to "cannonize" the nick, say by uppercasing, replacing "o" with "0", "i", "l" and "|" by "1", "-" by "_" etc., and add a column with the cannonic form to the users table.
may not be perfect, but as programming goes, will probably cost around 5 lines.
Martin Blank
Registered User
Posts: 687
Joined: Sun May 11, 2003 11:17 am

Re: Nick name protect

Post by Martin Blank »

He may also be looking to avoid a user on his board signing up as, say, qwеrtу-1, which might cause some confusion if the name he uses on his board is qwerty-1.
You can never go home again... but I guess you can shop there.
DoD
Registered User
Posts: 360
Joined: Sat Aug 30, 2003 11:32 am

Re: Nick name protect

Post by DoD »

arod-1 wrote: i dont think its a complex programming.
all you have to do is to "cannonize" the nick, say by uppercasing, replacing "o" with "0", "i", "l" and "|" by "1", "-" by "_" etc., and add a column with the cannonic form to the users table.
may not be perfect, but as programming goes, will probably cost around 5 lines.
No, it would be extremely complex to do.

First, you would have to think of all the possibilities...

i could easily think more than 30. (you would also have to include all letter deviations, such as accented letters)

Then you must calculate every possibility, such as *JUST* 'o' with '0' (also '0' with 'O')
Not just replace all cases of your match with your replacememnt.

If you had only 10 matches, that may be calculating up to 100 possibilities. 30 would mean 900 you would have to check for... which must be put through the database.

5 lines of code? lol.

things could be done to make it a little bit faster, but it would be so slow anyway you wouldnt notice it much.

but nothing will ever beat admin activation ;) This sort of script could never be 100% secure nor efficient. You have the option to ban user's and ip's... just use it.
User avatar
Eelke
Registered User
Posts: 606
Joined: Thu Dec 20, 2001 8:00 am
Location: Bussum, NL
Contact:

Re: Nick name protect

Post by Eelke »

I think what qwerty-1 means is that every character maps to a single character from a limited set, such as O, o, 0, ö, etc. all map to "O", <dash>, <underscore>, <space>, etc. all map to <space>, and so on. That way, you could generate a kind of "meta" form for every nick and it would be just a matter of comparing meta-forms. The comparisson should then probably be done loosely, i.e. when there is an 80 or 90% overlap between meta-forms, the name is not allowed.

The hard bit is defining the character-groups. Might even be impossible, as there might well be overlap between groups.
DoD
Registered User
Posts: 360
Joined: Sat Aug 30, 2003 11:32 am

Re: Nick name protect

Post by DoD »

Then there may be a possibility it would work... but IMO best left to a MOD...

In a system like this, though, it would never be able to 100% protect a nick (possibly reason why it would not be included) as you can just easily add other charachters to the nick. Unless you strip out in the meta any non A-Z, a-z 0-9 charachters. For example by just adding charachters such as `',. etc

hmmmmm...
arod-1
Registered User
Posts: 60
Joined: Mon Jun 06, 2005 8:33 pm

Re: Nick name protect

Post by arod-1 »

DoD wrote: No, it would be extremely complex to do.

First, you would have to think of all the possibilities...

i could easily think more than 30. (you would also have to include all letter deviations, such as accented letters)

Then you must calculate every possibility, such as *JUST* 'o' with '0' (also '0' with 'O')
Not just replace all cases of your match with your replacememnt.

If you had only 10 matches, that may be calculating up to 100 possibilities. 30 would mean 900 you would have to check for... which must be put through the database.

5 lines of code? lol.

things could be done to make it a little bit faster, but it would be so slow anyway you wouldnt notice it much.

but nothing will ever beat admin activation ;) This sort of script could never be 100% secure nor efficient. You have the option to ban user's and ip's... just use it.
it is clear you are not a programmer, and it also clear you didnt really understand what i said.
so let me explain one more (and last) time what i said:
you will need to cannonize the name. this means performing a single replacement that will bring 2 "similar" nicks to one "canonic" form. this can be done with a single call to "preg_replace()", and is VERY quick. then, a single query will find if a user with the same canonic nick is already registered. the code itself is simple and fast.
as you mentioned (and as did i), this will not be perfect, but it is not complex, and if you identify, say, ~100 "similarity pairs", it will still be a single operation, and not, as you seem to think, 10,000.

as to code length: it can easily be done with 5 loc, but, i am afraid that following the "coding guidelines" will require closer to 10.
DoD
Registered User
Posts: 360
Joined: Sat Aug 30, 2003 11:32 am

Re: Nick name protect

Post by DoD »

I mis-understood your first responce to this situation, my apologies. I jumped too quickly in replying. I was thinking about comparing a nick to the database.

Your method would be correct and possible.
Post Reply