Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
2 + 2 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
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.[/quote]" />

Yogurt
by Danielw42 on 2010/1/29 15:51:52

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.

Who's Online

214 user(s) are online (157 user(s) are browsing Support Forums)


Members: 0


Guests: 214


more...

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