MyBB Community Forums

Full Version: simple help needed for a plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i need to know whats the php mybb code to read the username which is logged in and display it as its show in the usernamefield?
$user['username'] if I remember correctly.
can anyone else confirm this


edit i found this in another plugin coudld anyone confirm this
$username = htmlspecialchars_uni($mybb->user['username']);

as a function
Did you try it? That is the one used in templates.
no i haven't yet, i'll need to try it when i update my plugin but i believe it would work
(2009-06-04, 12:59 AM)Scoutie44 Wrote: [ -> ]$user['username'] if I remember correctly.

What do actually want to show without using the $db variable that MyBB must uses for identifiyng the thing within the db
It must use $mybb->user to get the required data from the myBB db table
Just found that out while cruizin' my tempates.