SelfRegistration user properties

General project discussion. NOT for help questions.
Post Reply
zymon09
New Member
New Member
Posts: 6
Joined: Fri Jun 19, 2009 10:20 am

SelfRegistration user properties

Post by zymon09 »

i need some help in regards to the selfregistration module.

my website is basically a school website, where i have a section for alumni. Alumni will only be allowed to login if he/she is registered. Now i have created all the user properties of which the alumni is expected to fill in when registering, the issue is i have a field called 'Year of Joining' where i need when an alumni submit his/her registration details, the field 'year of joining' is used to be verified if really he/she was a student at that school.

right now anyone can register but i want such that first it needs to verify if the person exist within the records not anybody should register.

Please any help would be appreciated!
Peciura

Re: SelfRegistration user properties

Post by Peciura »

First of all create function lets say 'NewUserWasStudent' which checks supplied information.

Include your file to 'SelfRegistration.module.php' or '/modules/SelfRegistration/action.reguser.php'.

Create entry something like

Code: Select all

$lang['error_new_user_is_not_valid'] = 'No valid student was found in database';
  in '/modules/SelfRegistration/lang/en_US.php'

Write code similar to this

Code: Select all

if (!NewUserWasStudent($properties['propname']['data']))
      {
        $params['error'] = 1;
	$params['message'] = $this->Lang('error_new_user_is_not_valid');
      }
around 200 line in '/modules/SelfRegistration/action.reguser.php'

I guess that's about it. BTW it will be hacked version of SelfRegistration module supported by you only :). Have some fun ! :)
Post Reply

Return to “General Discussion”