Please, although it is saying
username all over on the invitation form, I already have people trying to put email addresses and of course, they get
Quote:
Fatal error: Unable to proceed with save while $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 779
|
is there a way to verify a username in the below and display a vb error if not found?
Thanks.
PHP Code:
foreach ($vbulletin->GPC['invite_username'] as $key => $invite)
{
if (!empty($invite))
{
// create the DM to do error checking and insert the new PM
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('fromuserid', $vbulletin->userinfo['userid']);
$pmdm->set('fromusername', $vbulletin->userinfo['username']);
$pmdm->set('title', $newpmtitle);
$pmdm->set('message', $message);
$pmdm->set_recipients($invite, $botpermissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
}
}