(XOOPS_GROUP_USERS, $newid)) { echo _US_REGISTERNG; include 'footer.php'; exit(); }
$newid = $newuser->getVar('uid'); if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) { echo _PROFILE_MA_REGISTERNG; break; }
//Welcome PM Hack start //Yeah,already defined above^^ // $newid = $newuser->getVar('uid'); $pm_handler =& xoops_gethandler('privmessage'); $pm =& $pm_handler->create(); $pm->setVar("subject", "Add the subject here"); $pm->setVar("msg_text", "Add your message text here!!!!!!!"); //Newuser's id $pm->setVar("to_userid", $newid); // Admin's id,1 in my case $pm->setVar("from_userid", 1); if (!$pm_handler->insert($pm)) { // echo "Failed to send Welcome Private Message!!"; // No need to echo this failure-message here,I think so!!...Just optional^^ } //Welcome PM Hack end
|
Auto PM to new members hack
Thanks Bluenova for a very usefil FAQ