MyBB Community Forums
Echo the user name - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Themes (https://community.mybb.com/forum-103.html)
+---- Forum: Theme Support (https://community.mybb.com/forum-10.html)
+---- Thread: Echo the user name (/thread-76366.html)



Echo the user name - kagronick - 2010-08-18

I need to say that the documentation is terrible. There should be a list of the variables you can use in templates. I cant find this anywhere. How do you echo the users name? {username} $mybb->username $mybb->['user']username I have no idea. Please help.


RE: Echo the user name - Damion - 2010-08-18

If your looking for the logged in user, i use:
{$mybb->user['username']}



RE: Echo the user name - Dylan M. - 2010-08-18

(2010-08-18, 04:52 AM)kagronick Wrote: I need to say that the documentation is terrible. There should be a list of the variables you can use in templates. I cant find this anywhere. How do you echo the users name? {username} $mybb->username $mybb->['user']username I have no idea. Please help.

Please remember that the majority of MyBB's documentation is in Wiki format so that anyone in the community can contribute to it. Also, sometimes you may find the information you're looking for if you get a little creative in your searching: http://wiki.mybb.com/index.php/Plugin_Methods#.24mybb

Lastly, please also remember that all staff are volunteers and have only a limited amount of time to spend on improving the software and the community. That being the case, there is always work to be done.

Thank you! And good luck Smile


RE: Echo the user name - kagronick - 2010-08-18

Thank you. The reason that I say that is because I found it before. It took hours of searching. Maybe I just wasn't looking in the right place. Or someone should put a link to it on the themes page maybe.