
09-30-2006, 09:41 AM
|
 |
|
|
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Lionel
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
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();
}
}
|
the only way i can think of, is a query for each username.
|