Author |
Message |
SpaceMonkey
Worker


Joined: Apr 30, 2005
Posts: 170
|
Posted:
Fri Jun 02, 2006 5:33 pm |
|
Hi,
I'm looking to stop people from registering unless they have a specific ending to their e-mail. eq.edu.au
For example, I'd like student11@eq.edu.au to be able to register but not student11@hotmial.com...
Is their anyway I could do this?
TIA |
|
|
|
 |
Susann
Moderator

Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Fri Jun 02, 2006 6:54 pm |
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Fri Jun 02, 2006 7:02 pm |
|
u could also use cnbya which has a list to stop e-mails from certain domains. |
_________________ For those who stand shall NEVER fall and those who fall shall RISE once more!! |
|
 |
 |
SpaceMonkey

|
Posted:
Fri Jun 02, 2006 7:25 pm |
|
That looks good.. But would there be a way to code it so that only .eq.edu.au are allowed rather than excluding everything else? Does that make sense? You know. So it just says if it isn't eq.edu.au you can't join... Instead of this isn't allowed etc..
I don't think I'm explaining myself clearly..
The above method would work.. But there must be an easier way. |
|
|
|
 |
gregexp

|
Posted:
Fri Jun 02, 2006 8:08 pm |
|
if i was coding it...i would make it something like this....i think this is what u want
modules/Your_Account/index.php:
right UNDER the globals...
if (ereg("@domain\.com",$user_email)){
now right after this..ull see a function
after that function paste this:
}
else {
$stop= "<center>"."E-mail must be a .... or you will not be allowed to sign on this site"."</center>";
}
edit the domain and dot that u would like to make that e-mail work...it will be the only e-mail able to work.
hope this helps. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Jun 02, 2006 8:45 pm |
|
This is just too funny a story to not tell it. I was at work this evening reading the orginal post and actually formulated a reply. When I hit the submit button I got the PC KIller!!! Turns out, the function code I pasted had some "bad strings" in it. So, whatever you do, do NOT post the full function code that Darklord is referring to.... what a "hoot" that was... Raven was beside himself laughing... I could hear him clear from Kansas!!! |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
SpaceMonkey

|
Posted:
Fri Jun 02, 2006 10:22 pm |
|
Yep, this looks good. I'll let you know if it works. |
|
|
|
 |
SpaceMonkey

|
Posted:
Sun Aug 20, 2006 7:07 pm |
|
This did actually work with the old version of RavenNuke. I just upgraded it recently and it doesn't seem to work anymore
I've tried putting the various bits in but it just doesn't seem to work. I really need to get this going again.
Any help would be much appreciated! |
Last edited by SpaceMonkey on Sun Aug 20, 2006 9:15 pm; edited 1 time in total |
|
|
 |
gregexp

|
Posted:
Sun Aug 20, 2006 7:23 pm |
|
Those are code snipets to be placed in the index.php.
You wont find these codes within the index.php, You have to put it in there. |
|
|
|
 |
SpaceMonkey

|
Posted:
Sun Aug 20, 2006 9:21 pm |
|
Yeah, thanks DL. It worked really well last time I did it but I seem to be doing something stupid this time. I put the if (ereg("@domain\.com",$user_email)){ bit in under the globals exactly as it is. Then I go down under the first function and put }
else {
$stop= "<center>"."E-mail must be a .... or you will not be allowed to sign on this site"."</center>";
} in..
It just throws errors at me after that. Can I e-mail this to someone so they can check it. Sorry about this but it's freaking me out that anyone can register at the moment.. |
|
|
|
 |
SpaceMonkey

|
Posted:
Mon Aug 21, 2006 12:07 am |
|
OK, I've got it working. But I did it by doing the following. Let me know if you think this is going to cause problems.
I just put the whole thing in the one spot right after the globals like this:
if (ereg("@domain\.com",$user_email)){
}
else {
$stop= "<center>"."E-mail must be a .... or you will not be allowed to sign on this site"."</center>";
}
Is this going to screw anything up? |
|
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Thu Aug 24, 2006 12:41 pm |
|
It looks fine, shouldn't mess with anything |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
 |
|