Cooper
Active member
In vB I was able to send PMs by using the PM API for example:
Is there a way to do this in Xenforo currently?
PHP:
function pm_api($fromuserid, $fromusername, $title, $message, $recipients)
{
global $vbulletin, $botpermissions;
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('fromuserid', $fromuserid);
$pmdm->set('fromusername', $fromusername);
$pmdm->set('title', $title);
$pmdm->overridequota = true;
$pmdm->set('message', $message);
$pmdm->set_recipients($recipients, $botpermissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
unset($pmdm);
return $pmdm;
}
Is there a way to do this in Xenforo currently?