1
xb00t
PM On Join
  • 2005/5/24 10:05

  • xb00t

  • Just popping in

  • Posts: 45

  • Since: 2004/8/19


Is there a way to PM a new member as soon as he registers? I would like to write a welcome msg to my new members and I want it to be recieved the moment they regiser. PM On Join. :)

Thanks. :)

2
bluenova
Re: PM On Join

Open register.php

Find:
le="color: #000000"><?php (XOOPS_GROUP_USERS, $newid)) { echo _US_REGISTERNG; include 'footer.php'; exit(); }


Add After:
le="color: #000000"><?php //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

3
davidl2
Re: PM On Join
  • 2005/5/24 11:24

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Thank you, this is very useful :)

(Perhaps this is a good option to include with your PM work Mith?)

4
-FireHorse-
Re: PM On Join

sorry to resurect an old post but it seemd appropriate, how would I get php to add uid data to an ini file another ap to access eg

[uid]
barry=33

cheers
FireHorse

Login

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits