1
kasper48
adding a regex to the email field during sign up
  • 2006/10/20 20:00

  • kasper48

  • Just popping in

  • Posts: 2

  • Since: 2006/10/20


Hello,

I am trying to make my registration page require that email addresses fall under a certain structure, depending on the 'school' form list that they select in the registration form.

I am about halfway up the XOOPS learning curve, and while I have figured out how to modify the registration form, I cant understand where I should hack XOOPS to start screening the email addresses.

My goal is to get something running a la 'Facebook' where the registration ensures a user goes to a certain school by requiring there email adress to be from that school. I.E. if they go to 'McGill University', the email regex would require the confirmation email to be sent to a 'mail.mcgill.ca' email addy.

Any nudge in the right direction would be greatly appreciated!

Cheers,

Greg.

2
m0nty
Re: adding a regex to the email field during sign up
  • 2006/10/20 21:57

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


best place to add the check would be in register.php

right after:

if (strrpos($email,' ') > 0) {
        
$stop .= _US_EMAILNOSPACES.'';
    }


in function userCheck()

but you'll probably need to write another function to check the regex for matches with the school select field you will be doing..

not sure how u would go about that yet..

i presume you're making a new form class for the school field?

3
kasper48
Re: adding a regex to the email field during sign up
  • 2006/10/24 3:01

  • kasper48

  • Just popping in

  • Posts: 2

  • Since: 2006/10/20


Thanks a lot mOnty,

I am going to add a new form class, and I was thinking of getting the regular expression for a 'schools' table that I've addded to the XOOPS Database, and then performing the check after the line of code you pointed out....

Any thoughts?

Greg.

Login

Who's Online

308 user(s) are online (253 user(s) are browsing Support Forums)


Members: 0


Guests: 308


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits