PDA

View Full Version : session vars in php direct execution widget


Craigjb12
05-17-2010, 06:23 PM
can anyone tell me how to retrieve the following template variables in a php direct execution widget?

{vb:raw session.sessionhash}
{vb:raw bbuserinfo.securitytoken}

Thanks!

--------------- Added 1274124841 at 1274124841 ---------------

one down...

$sessionhash = $_COOKIE["bb_sessionhash"];

--------------- Added 1274125493 at 1274125493 ---------------

Solved for future searchers:

$securitytoken = vb::$vbulletin->userinfo['securitytoken'];
$sessionhash = $_COOKIE["bb_sessionhash"];

pyd
05-24-2010, 04:02 PM
Sorry for late reply.
I had completley forgotten about this, other things got in the way, but now I'm ready again :)

I think I got it right, but haven't tested it yet...
But I see that you got it right, so I might hunt you down in a few days :)