MyBB Central

Full Version: User ID in Header?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a variable or some way that I can make the logged in user's ID come up in the header?

I'm trying to make a 'Posts by You' in the navigation.

Problem is, the variable {$uid} doesn't work.
If you want a link to find their own posts next to search, member list etc, use this:
Code:
<a href="http://www.yoursite.com/forums/search.php?action=finduser&uid={$mybb->user['uid']}">Find My Posts</a>

It creates this URL when clicked:
Code:
www.yoursite.com/forums/search.php?action=finduser&uid=1

And it will show posts by that user Smile The variable you were looking for might be {$mybb->user['uid']}
Wow thanks Smile
Thanks for this! A really handy little link to add to site for members!
No problem Smile