$pm = new PrivateMessage(); // Send a message
$pm->setsender('SYSTEM');
$pm->setrecipient(htmlentities(addslashes(trim($mysidia->user->username))));
$pm->setmessage("Friend Request Accepted!", "<p>Your friend request from {$mysidia->user->nickname} been accepted.</p>");
$pm->post();
return;
So I have this code for when a user accepts a friend request, an alert tells the person who sent the request that the request was accepted. I have it all working, except the user it keeps sending the alert to is the accepter themselves, instead of to the sender who sent the request. Any idea how I can fix this? I'm wanting the alert to go to a person when their outgoing friend request was accepted.
$pm->setsender('SYSTEM');
$pm->setrecipient(htmlentities(addslashes(trim($mysidia->user->username))));
$pm->setmessage("Friend Request Accepted!", "<p>Your friend request from {$mysidia->user->nickname} been accepted.</p>");
$pm->post();
return;
So I have this code for when a user accepts a friend request, an alert tells the person who sent the request that the request was accepted. I have it all working, except the user it keeps sending the alert to is the accepter themselves, instead of to the sender who sent the request. Any idea how I can fix this? I'm wanting the alert to go to a person when their outgoing friend request was accepted.