Hi! Thanks to everyone who contributed to this thread, it contains some very helpful information already.
I am trying to do the same thing but rather than having the Admin activation email contain the added field, I would like the email that notifies a selected group of users when a new user registers to the site to contain the field I’ve added to the register page (Real Name).
The function which sends this email is in register.php file and I have managed to slightly modify it to send the added field (Real Name in my case as well), but could not manage to have the email contain more than one variable in the e-mail’s body. This might be a limitation of the setBody(sprintf(,))?
Unmodified Register.php line 270 to 276
$xoopsMailer->setToGroups($member_handler->getGroup($xoopsConfigUser['new_user_notify_group']));
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
$xoopsMailer->setFromName($xoopsConfig['sitename']);
$xoopsMailer->setSubject(sprintf_US_NEWUSERREGAT,$xoopsConfig['sitename']));
$xoopsMailer->setBody(sprintf(_US_HASJUSTREG,$myts>oopsStripSlashesGPC($uname)));
$xoopsMailer->send();
Attempt one of modifying Line 275
$xoopsMailer->setBody(sprintf(_US_HASJUSTREG,$myts->oopsStripSlashesGPC($uname)), sprintf(_US_HASJUSTREG,$myts->oopsStripSlashesGPC($name)));
well that didn’t work,
Attempt two of momodifying Line 275
$xoopsMailer->setBody(sprintf(_US_HASJUSTREG,$myts->oopsStripSlashesGPC($uname), $myts->oopsStripSlashesGPC($name)));
well that didn’t work either,
the variable I would like to add to the body of the email is $name and it is declared with the correct value, the problem is adding it to the e-mail’s body on-top of the Username.
if you figure it out, let me know
if I need to clarify myself farther, let me know as well
TommyZ