my searches for similar threads only found ones for 3.5 so hopefully someone can help me
I've written a threadbot that makes a new thread from stored data in a table, as far as I can determine the information sent to build_new_post is correct and should make a thread without a problem, and when running it manually there isn't a problem
However when using Scheduled Task Manager the thread is posted as the nick of someone currently browsing the forum (its ignoring whatever I setup in my script)
I vaugly guess I know what is happening (build_new_post is grabbing the posting username from whoever is online) but I can't seem to solve the problem
any suggestions?
here is the relevent code in my script:
PHP Code:
$foruminfo = fetch_foruminfo($tbt_forumid);
$bbuserinfo = fetch_userinfo($tbp_userid);
$post['parseurl'] = 1;
$post['signature'] = 1;
$post['preview'] = 0;
$post['disablesmilies'] = 0;
$post['enablesmilies'] = 1;
$post['rating'] = 0;
$post['iconid'] = 0;
$post['message'] = $tbp_pagetext;
$post['title'] = $tbt_title;
$post['emailupdate'] = 9999;
$post['folderid'] = 0;
$post['username'] = "confus";
$post['poststarttime'] = TIMENOW;
$post['posthash'] = md5($post['poststarttime'] . $bbuserinfo['userid'] . $bbuserinfo['salt']);
build_new_post('thread', $foruminfo, array(), 0, $post, $errors);