MyBB Community Forums

Full Version: Obtain User ID
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If I'm looking at "Someone Elses" profile how would I get there USER ID?

For example...

<a href="search.php?action=finduser&uid=USER_ID_HERE">View Recent Posts</a>

I've tried using..

{$mybb->user['uid']}

But it didn't work, It just returned "My" user id # obviously.

Any help is appreciated thank you!
(2013-10-31, 03:01 AM)MJ456 Wrote: [ -> ]Check with send PM page.

forum.com/private.php?action=send&uid=xxxx

Yeah I was looking through the Templates for PostBit and even gave

{$post['uid']}

But that didn't work neither.
(2013-10-31, 03:06 AM)MJ456 Wrote: [ -> ]You don't need to search with templetes. Just go to forum, open send PM page through that user profile and on address bar his uid will be shown.

I don't think your understanding me Wink..

<td class=\"trow1\"><a href=\"search.php?action=finduserthreads&uid={$post['uid']}\">View Recent Topics</a></td></tr>

<td class=\"trow1\"><a href=\"search.php?action=finduser&uid={$post['uid']}\">View Recent Posts</a></td></tr>

This is what I'm trying to do within a .php file i'm currently working on. I'm trying to set the uid={$post['uid']} as the users ID #. But it just comes up as mine in the end result. I'm wondering how to obtain THERE'S instead.

Anybody? O.o :\
Where do you wanna show this ??

url because i have this on postbit and i add this.

If you wanna show on postbit, like showthread.php url ref, you have to put:

{$post['uid']}

But where do you wanna add this, what url, because are many many vars to use inside some urls xD.

post uid are from every user who posted a new message, mybb user uid it's for your id, but tell me where do you wanna use this value, url, because all references change sometimes.
(2013-10-31, 03:35 AM)Dark Neo Wrote: [ -> ]Where do you wanna show this ??

url because i have this on postbit and i add this.

If you wanna show on postbit, like showthread.php url ref, you have to put:

{$post['uid']}

But where do you wanna add this, what url, because are many many vars to use inside some urls xD.

post uid are from every user who posted a new message, mybb user uid it's for your id, but tell me where do you wanna use this value, url, because all references change sometimes.

When I view MY profile I want the links shown in the picture to be with my User ID...
[Image: LNu1xjg.png]

But If I view somebody elses profile I want the link to show there User ID...
[Image: Ziy0cEy.png]
If you wanna show that on member profile you have to use this var:

{$memprofile['uid']}

If this var does not work you may use:

{$uid}

Cheers.
(2013-10-31, 03:42 AM)Dark Neo Wrote: [ -> ]If you wanna show that on member profile you have to use this var:

{$memprofile['uid']}

If this var does not work you may use:

{$uid}

Cheers.

{$uid} worked perfectly! Thank you very much for that man. This can be marked as resolved ;]
you dont tell where do you wanna add this.

by default this values are inside member profile and the var for every member profile are memprofile['uid'].

But in postbit are:

post['uid']

So where do you wanna add this, whats the url, because you have to check it about this href value and core files of MyBB.

Examples:

showthread.php
memberprofile.php

Because you have to verify what files and what vars are taken on MyBB to display results as you want.
Ur good man my last post I said that the {$uid} worked. much appreciated for your help!
Thanks for reply, it's good to see that helps to you.

Well any other thing you can ask as you wish.

Solved then xD.