Glenn, Thank you for the assist. This is great if you want to post as someone else. (I will definitely keep this, I'm sure I can use it). What I was trying to do is. Right after the member has been approved, and the save has completed, but before the welcome email has been sent. I needed it to send a post to a forum that is accessible to usergroup 2. Problem is. They are not usergroup 2 yet at that point, even though its saved. However. I was able to take a chunk of your code
Code:
$newsession = new vB_Session_Cli(vB::getDbAssertor(), vB::getDatastore(), vB::getConfig(), $postUserId);
vB::setCurrentSession($newsession);
put that before the api call. This updated their saved status and allowed them to make the post.
This way I have the postid, and I can use it in the welcome email to tell the user to watch the post for questions on their recruitment.
No code modified. I wouldn't have been able to do it without your section of code, or the idea to change user sessions. So thank you very much. You and Replicant are a great value to this community. I don't care what they say about you