![]() |
New PHP File - Pulling Logged-in User ID?
I am trying to make a custom .php page for my site, and have the basics working (PHP file linked to template and displaying okay).
I am trying to pull some fields by linking to the currently logged-in user's UserID. In my select portion I am trying to have it pull the info using $bbuserinfo[userid] and $userinfo[userid], but neither is working. I have also tried setting a variable to the above, and referencing the variable in the query, but that doesn't work either. Is there a way to do this? I'm so sorry for the newbie-ish question! |
If you want to pull the info of the person viewing the page, you would use $bbuserinfo. In order to use it though, you need to have global.php included in the page. See these articles - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
|
Many thanks! I had already tried one of those tutorials, but it apparently wasn't pulling the correct things. That error has been sorted out, now onto the actual coding!
|
PHP Code:
|
All times are GMT. The time now is 05:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|