PDA

View Full Version : userinfo array is empty?


webForum-dev
12-06-2008, 12:37 PM
Hello, I'm trying to write a plugin using the showthread_start-hook.

I want to get the current logged in user userid.

I have tried alot of things.
$vbulletin->userinfo['userid'];
$vbulletin->userinfo[userid];
$bbuserinfo[userid];

But they are always empty, evfen if I'm logged in.

I also tried showthread_complete but userinfo is still emtpy.
I also tried to print the whole useinfo-array but that is also empty.

Any ideas?

Lynne
12-07-2008, 02:55 AM
$vbulletin->userinfo['userid'] should be valid in the showthread_start plugin. Perhaps if you post your code we can see what is wrong.

webForum-dev
12-07-2008, 06:51 AM
I had forgotten to set vbulletin as global in my function.

Thanks!