Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 17 Mar 2005, 05:08
bmpwe bmpwe is offline
 
Join Date: Jul 2004
Limit only users to single email domain.

Is there any way to allow only users with a foo.com email addresse to register?
Reply With Quote
  #2  
Old 17 Mar 2005, 05:41
Jolten Jolten is offline
 
Join Date: Mar 2004
wow.. that would be quite limiting.
Reply With Quote
  #3  
Old 17 Mar 2005, 06:16
bmpwe bmpwe is offline
 
Join Date: Jul 2004
Originally Posted by Jolten
wow.. that would be quite limiting.
I'm devolping a college community website... liniting the addresse is the best method I've thought of to keep not students from joining.

BTW, our uni gives away email addresses to all students.
Reply With Quote
  #4  
Old 17 Mar 2005, 07:04
Jolten Jolten is offline
 
Join Date: Mar 2004
but... if all your students have an @school.org email, you'd be limiting registration to 1 student.
Reply With Quote
  #5  
Old 17 Mar 2005, 07:28
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Originally Posted by Jolten
but... if all your students have an @school.org email, you'd be limiting registration to 1 student.
You wold be limiting to the @school.org domain. this will still mean that both [email protected] and [email protected] could signup
__________________
Marco van Herwaarden
Ex vBulletin.org Coordinator
Reply With Quote
  #6  
Old 17 Mar 2005, 08:04
Jolten Jolten is offline
 
Join Date: Mar 2004
guess I read it wrong sorry.
Reply With Quote
  #7  
Old 17 Mar 2005, 08:14
Brad Brad is offline
 
Join Date: Nov 2001
Heres a simple way to do it, but you'll lose the ability to ban domains (which should'nt matter because you are only allowing certain domains anyway). What I am basicly going to do is take the Banned Email Addresses list and turn it into the Allowed Email Addresses list.

Open functions_register.php in a code editor, and find this block of code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Simple function, if a email address is on the list it returns 1, otherwise 0. Depending on what it returns an error is thrown letting the user know the email address they entered has been banned. So basicly by swaping the 0 and 1 you will reverse what triggers the error, which in this case would be a email address that is not on the list.

So our block of code becomes:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Now navigate to vB admin cp -> vBulletin Options -> User banning options -> Banned Email Addresses and enter "@foo.com" (without quotes) in the textarea and anybody that registers will have to use an email address on the @foo.com domain.

This best thing about this approch is that it supports multiple domains, and its easy to add and modify them.
Reply With Quote
  #8  
Old 17 Mar 2005, 16:25
bmpwe bmpwe is offline
 
Join Date: Jul 2004
Thank you very much.

Is there any way I can let moderators and administers have a non foo.com domain? I'm hoping to expand this... if I did, I won't have access to other schoools email addresses.

Where exactly is this file? There is a file in includes/ that has the exact file name you mentioned.... but the code you quoted is nowhere to be found. This is all the file includes:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by bmpwe; 17 Mar 2005 at 23:19. Reason: Automerged Doublepost
Reply With Quote
  #9  
Old 05 Apr 2005, 10:58
Aylwin Aylwin is offline
 
Join Date: Mar 2005
The code to be changed is in functions_user.php.
Reply With Quote
  #10  
Old 30 Jul 2006, 02:43
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Brad - thanks for this suggestion. I needed to restrict our users to a certain set of domains (we're an ISP, providing forums for just our users), and turning the "banned domains" into "allowed domains" was exactly what I needed.

One note for anyone else needing to do this. Enforcing specific domains for the email during registration is half the solution. The other half is preventing them from changing their email once they have signed up. To do this, you can either edit the 'modifypassword' template accordingly, or you can edit profile.php to force $show{edit_email_field} to always be FALSE.

-- hugh
Reply With Quote
  #11  
Old 11 Aug 2006, 16:14
JMikeS JMikeS is offline
 
Join Date: Jun 2005
Has anybody confirmed that this works on 3.6?
Reply With Quote
  #12  
Old 22 Aug 2006, 20:26
richgeeks richgeeks is offline
 
Join Date: Aug 2006
i just made this modification and it is not allowing anyone to register now, even when i turn user banning options off...please help

anyone???

Last edited by richgeeks; 23 Aug 2006 at 19:47. Reason: Automerged Doublepost
Reply With Quote
  #13  
Old 06 Sep 2006, 17:49
JMikeS JMikeS is offline
 
Join Date: Jun 2005
Originally Posted by richgeeks
i just made this modification and it is not allowing anyone to register now, even when i turn user banning options off...please help

anyone???
The function has changed for 3.6. I'm trying a fix now, and will let you know if it works.

Cheers,

Here is the correct code (found somewhere else on this forum):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by JMikeS; 07 Sep 2006 at 17:06. Reason: Automerged Doublepost
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mini Mods Limit Registration By Email Domain 1.1 ForumsMods vBulletin 3.7 Add-ons 22 19 Dec 2014 02:32
Limit User Registration - Based Upon Email (Domain) Dpcows vBulletin 3.6 Add-ons 22 02 Dec 2006 09:48



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:53.

Layout Options | Width: Wide Color: