Print Page | Close Window

Allow only one domain to register

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=3218
Printed Date: 01 April 2026 at 11:10am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Allow only one domain to register
Posted By: lsabug
Subject: Allow only one domain to register
Date Posted: 02 June 2003 at 4:50pm
Greetings,

I'm a bit stuck as to how to limit registration from only one domain, ie. www.alloweddomain.org. All other domains (yahoo.com, rr.com, etc.) wouldn't be able to register. Is there an easy way to do this?

Much obliged.
lsa



Replies:
Posted By: WebWiz-Bruce
Date Posted: 02 June 2003 at 4:58pm
You need to have email notification enabled for this and set the domain as one to not allow for email addresses.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: fernan82
Date Posted: 02 June 2003 at 5:00pm

1. Add that domain to the blocked list...

2. Open register.asp

3. Change line 135 from:

blnEmailBlocked = False to: blnEmailBlocked = True

4. Change line 562 from:

If InStr(1, strEmail, strCheckEmailAddress, 1) Then blnEmailBlocked = True

to:

If InStr(1, strEmail, strCheckEmailAddress, 1) Then blnEmailBlocked = False

5. Save it.

I believe that should do it but i've never tried it so just give it a shot...



-------------
FeRnAN
http://www.danasoft.com/">


Posted By: lsabug
Date Posted: 03 June 2003 at 11:16am

Many thanks fernan82. I just tried what you suggested and it seems to be working.

I really appreciate your help

 



Posted By: lsabug
Date Posted: 03 June 2003 at 11:26am

Oops, just one more thing keeps popping up.

Now that I've changed the registration to only allow one domain to register, everytime I test the registration form an error message comes up saying:

Sorry, the email address or domain entered has been blocked by the forum administrator

even though it's the allowable domain. When I close the error message I can still continue registering but I'm afraid it will confuse forum users if they see that message.

I'm not sure why this is happening. Is there another line I need to change?

Sorry to be a bugger.

lsa



Posted By: vdub
Date Posted: 03 June 2003 at 5:24pm
Just coment out the code that creates the popup.

-------------
http://www.CyberCPU.net - Hardware reviews, Forum, Free advertising!!!!


Posted By: fernan82
Date Posted: 03 June 2003 at 7:05pm

you can do that or change line 1163 from If blnUsernameOK = False OR blnEmailOK = False OR blnEmailBlocked = True Then %> to If blnUsernameOK = False OR blnEmailOK = False OR blnEmailBlocked = False Then %> and line 1179 from If blnEmailBlocked = True Then to If blnEmailBlocked = False Then

also search the whole file for blnEmailBlocked and whenever is followed by = False change it to = True and vice-versa...

<edit> also be careful when you do that search n replace, make sure you don't change back the lines you've already changed cuz that would mess it up and you might have to reupload a fresh copy of the file and start over....



-------------
FeRnAN
http://www.danasoft.com/">



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net