Page 1 of 1

User registration email

PostPosted: Wed Aug 06, 2008 10:18 pm
by Todor
Hi Steve,
I know that you had helped me out a lot already, but i am still struggling with this one last bit of change i need to make:
Upon registration, instead of the usual process, i would like an email to be sent to the administrator with the data that was submitted by the new user, so that the admin can manually enter it in the database later.
So far, i had modified include/functions.inc.php' registerUser() function to include:
function registerUser(){
if ( isRegistered() ) return;
$user =& getUser();
$user->setValue('role','USER');
$user->save();
sendAdminEmail('A new user would like to register', getLDAPUserInfo($userid));
}

however, i cant get it to work. what am i doing wrong? thank you in advance.

-Todor

PostPosted: Fri Aug 08, 2008 1:33 pm
by shannah
Hi Todor,

Sorry for the registerUser() function --- it is unused -- a remnant of a previous version used within the university.

However there is another solution. Perhaps implement the sendRegistrationActivationEmail() method in the application delegate class.

You may also want to change the info message they get after registration too to reflect the new process.

You can do that by adding the following to your lang/en.ini file:
Code: Select all
actions.register.MESSAGE_THANKYOU_PLEASE_VALIDATE = "Thanks for registering ... awaiting administrator approval"

thanks

PostPosted: Mon Aug 11, 2008 10:01 pm
by Todor
Thank you, that worked great

-Todor