1
Danielw42
Yogurt
  • 2010/1/29 15:51

  • Danielw42

  • Just popping in

  • Posts: 15

  • Since: 2010/1/14


Hi everyone

Let's say, I want to add someone to my friends list so I send a request to that person. Here's what I want to do: If that person refuses my request,a message should be automatically sent to me.

In makefriends.php, after line 73, I added this code:

$pm_handler =& xoops_gethandler('privmessage');
$pm =& $pm_handler->create();
$pm->setVar("subject", "Friend request");
$pm->setVar("msg_text", "text here");
$pm->setVar("to_userid",$petitioner_uid );
$pm->setVar("from_userid, 1");
$pm_handler->insert($pm);

where petitioner_uid = uid.

I am missing something because a message is still not sent to that user with id of petitioner_uid.

How to get id from petitioner_uid?
$petitioner_uid = $xoopsUser->getVar('uid');?

Please help me.

Login

Who's Online

232 user(s) are online (145 user(s) are browsing Support Forums)


Members: 0


Guests: 232


more...

Donat-O-Meter

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

Latest GitHub Commits