Xoops 2.0.X 打开 /**Xoopsinstallation**/register.php
查找
(XOOPS_GROUP_USERS, $newid)) { echo _US_REGISTERNG; include 'footer.php'; exit(); }
Xoops 2.2.X 打开 /**Xoopsinstallation**/modules/profile/register.php
查找
$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
新会员自动私信漏洞
感谢 Bluenova 提供了一个非常有用的常见问题解答