Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Require a certain word in username when register?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Stinger
Starting Member

USA
41 Posts

Posted - 13 March 2002 :  03:46:02  Show Profile
Can somebody help me if I want people who register to my forum must contain a certain word in their username? (since I have a special club ) For example I want all username contain a word AB. Then the usernames have to be in the form: AB Name, or Name AB, or Nameab... If they don't have the word AB then the registration cannot be completed.
Thanks a lot!

Stinger >:)

Promark
Starting Member

USA
2 Posts

Posted - 19 March 2002 :  14:41:56  Show Profile
All you need to do is insert this little bit of code into the register.asp file. I am using a modified 3.1.4 so my file is not the same as yours, but it should accomplish the same goal. I placed it just after the check for '<' or '>' in the User Name (line 95 for me).

if (Instr(Request.Form("Name"), "ab") = 0 ) then
Err_Msg = Err_Msg & "<li> You must include ab in your name</li>"
end if

You can put whatever you want in the error message. Be aware though that this will only check to see if "ab" is ANYWHERE in the name, so both 'abPromark', and 'rabbit' would work. If you want to add other requirements you can add it like this:

if (Instr(Request.Form("Name"), "ab") = 0 ) and (Instr(Request.Form("Name"), "AB") = 0) then
Err_Msg = Err_Msg & "<li> You must include ab in your name</li>"
end if



Edited by - Promark on 19 March 2002 14:43:39
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07