4
Quote:
It's written in Japanese.
^^;;
------------
First, open the file, /html/register.php.
and then find this code!
line 200-209
$newid = $newuser->getVar('uid');
if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) {
echo _US_REGISTERNG;
include 'footer.php';
exit();
}
if ($xoopsConfigUser['activation_type'] == 1) {
redirect_header('index.php', 4, _US_ACTLOGIN);
exit();
}
Just add hack-code(//Welcome PM Hack start ~~ //Welcome PM hack end) like this^^;;
(please, write your own subject and message...instead of mine)
$newid = $newuser->getVar('uid');
if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) {
echo _US_REGISTERNG;
include 'footer.php';
exit();
}
//Welcome PM Hack start
//Yeah,already defined above^^
$pm_handler =& xoops_gethandler('privmessage');
$pm =& $pm_handler->create();
$pm->setVar("subject", "Welcome To Wanisys^^and thanks for your join!!");
$pm->setVar("msg_text", "Hi^^I am wani,administrator of Wanisys!nThanks for your join!!nHave a nice time!!n");
//Newuser's id
$pm->setVar("to_userid", $newid);
// Admin's id, it's 1 in most 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
if ($xoopsConfigUser['activation_type'] == 1) {
redirect_header('index.php', 4, _US_ACTLOGIN);
exit();
}