MyBB Community Forums
how to get user id - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: how to get user id (/thread-204974.html)



how to get user id - metulburr - 2016-10-10

I am using simple likes plugin and it says to insert
Number of likes received: <a href="{$mybb->settings['burl']}/misc.php?action=post_likes_received_by_user&user_id={$post['id']}">{$post['likes_received']}</a> 

into postbit and postbit_classic
However when i do this and click on the number i get the in mybb error of

Quote:No post ID provided. Are you sure you're accessing this function correctly?
with the url of
http://python-forum.io/misc.php?action=post_likes_received_by_user&user_id=

There is no number at the end of the select user id
I tried adding {mybb->user['uid']} but then i get my own like list and not the user i selected from the post bit.


RE: how to get user id - NickGHQ - 2016-10-10

Use this:
Number of likes received: <a href="{$mybb->settings['burl']}/misc.php?action=post_likes_received_by_user&user_id={$post['uid']}">{$post['likes_received']}</a>



RE: how to get user id - metulburr - 2016-10-11

thanks. That worked. I cant believe i didnt try that one.