Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

 
Reply to this topicStart new topic
> Only Allow Certain Emails To Register, is it possible?
xx66stangxx
post Nov 1 2007, 01:33 AM
Post #1


Member
**

Group: Members
Posts: 139
Joined: 6-July 06
From: O.C.
Member No.: 74,928



Ok so I have a project in mind which is create a social network for my college. but when the user registers I want to make sure they are an actual student of the college so they would have to sign up with the college email they use i.e. student@csu.fullerton.edu now is that possible? I realize that each student has a dif. prefix in the email but all the current student emails are @csu.fullerton.edu now how would I do that for the registration page?
Go to the top of the page
 
+Quote Post
groovicus
post Nov 1 2007, 07:31 AM
Post #2


Hail Groovicus!
******

Group: Site Admin
Posts: 6,453
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



You would use some form of regular expression matching. But that still doesn't guarantee that they will give you a valid email address because "bozosrus@csu.fullerton.edu" would pass the same test that a valid address would. So the other option is that once they sign up, you send them a validation e-mail to which they have to respond before they can actually use the account.


--------------------
Go to the top of the page
 
+Quote Post
xx66stangxx
post Nov 1 2007, 10:13 PM
Post #3


Member
**

Group: Members
Posts: 139
Joined: 6-July 06
From: O.C.
Member No.: 74,928



ok I will look that up, yeah I planned on doing the validation email :-)
Go to the top of the page
 
+Quote Post
groovicus
post Nov 2 2007, 07:33 AM
Post #4


Hail Groovicus!
******

Group: Site Admin
Posts: 6,453
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



If you are doing a validation email, then there is no need to check anything. Either they give a proper email address and get the validation link, or they do not give a proper address and do not get a validation link.

EDIT: Of course, that doesn't answer your original question. You can use javascript to initially check that the the address contains the required @csu.fullerton.edu, but all it will be checking isthat the address contains the proper domain. The regular expression used to match it is pretty simple. I nabbed this code from some random page and modified it. I did not test it, but it should be close:
CODE
function checkMail()
{
    var x = document.forms[0].email.value;
    var filter  = /^([a-zA-Z0-9_\.\-])+\@(csu.fullerton.edu)$/;
    if (filter.test(x)) alert('YES! Correct email address');
    else alert('NO! Incorrect email address');
}


This code only checks the address. It does not pass on the string if it is valid. There are tons of code samples for form validation, so you should have no problem finding something that works. On the server side, you will just need something to generate the validation email, and then a form that recognizes when a validation link has been clicked. Is it the back-end mechanism that you are asking about?


--------------------
Go to the top of the page
 
+Quote Post
ussr1943
post Nov 9 2007, 12:00 AM
Post #5


Senior Member
****

Group: Members
Posts: 489
Joined: 6-August 06
From: USA
Member No.: 79,661



You could also use php to validate any inputs(requires host that supports php, and possibly database), then store all your info in a database for later retrieval(sending emails out). However if you do plan on saving user information please remember
1.) protect against database injections, xss, csrf ect.
2.) always encrpyt user information(if being stored), hashes and salts to prevent anyone outside from atleast understanding your stored info

There are many means to the end, you might just want to do a little online research first.



This post has been edited by ussr1943: Nov 9 2007, 12:06 AM


--------------------
"Ideas are far more powerful than guns."
"The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards -- and even then I have my doubts." --Eugene H. Spafford
"One man's terrorist is another's freedom fighter"
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 8th January 2009 - 10:26 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.