PDA

View Full Version : Create Thread as a Guest


Enclave
06-12-2007, 06:50 PM
I have fallowing code to create a thread and this working fine when I logged in. But as a guest it not working. :(

$forumid = 16; // The forum where the thread should be posted

// Get forum & user info
$foruminfo = fetch_foruminfo($forumid);
$bbuserinfo = fetch_userinfo($userid);

// Setup the thread
$post[title] = $title;
$post[message] = "Dein Feedback oder Kommentar ?ber diesen Spot. Link: http://www.alpenplaner.ch/spot".$sp[id].".html";
$post[poststarttime] = TIMENOW;
$post[posthash] = md5($post[poststarttime] . $bbuserinfo['userid'] . $bbuserinfo['salt']);

// build the thread
build_new_post('thread', $foruminfo, array(), 0, $post, $errors);

Thank you for help...

Dismounted
06-13-2007, 09:46 AM
The userinfo doesn't exist when viewing as a guest...