squishi |
11-21-2012 01:13 PM |
Name check when creating a thread with threadmanager
I am trying to create a new thread with PHP:
PHP Code:
$threaddm =& datamanager_init('Thread_FirstPost', $vbulletin, ERRTYPE_ARRAY, 'threadpost');
$foruminfo = verify_id('forum', $forum_id, 0, 1);
$threaddm->set_info('forum', $foruminfo);
$threaddm->set('forumid', $forum_id);
$threaddm->registry->options['floodchecktime'] = 0;
$threaddm->set('username', $username);
$threaddm->set('title', $title);
$threaddm->set('pagetext', $pagetext);
$threaddm->set('allowsmilie', $allowsmilie);
$threaddm->set('lastposter', $username);
$threaddm->set('visible', 1);
$threaddm->set('dateline', $dateline);
$threaddm->pre_save();
if(!empty($threaddm->errors))
{
var_dump($threaddm->errors);
die();
}
Output:
Quote:
array(2) { [0]=> string(180) "That username is already in use or does not meet the administrator's standards. If you are admin and you have forgotten your password, click here." [1]=> string(45) "You did not specify a username for your post." }
|
Yes, the username is admin and I have set this username to be banned and not to be used in new registrations.
However, it makes no sense that vbulletin would not allow me to create a new thread with that username!
What is wrong with the above code? :confused:
|