If you are using a Mybb forum, the codes you can use to retrieve the values you want are given below.
If you want to use these codes on a new page rather than inside the Mybb forum, you must first put the following codes at the top of the page
<?
define (“IN_MYBB”,1);
require(“global.php”);
?>
you must put these codes.
User Variables $mybb->user[‘xxx’]
- uid – Retrieves the uid value of the user logged into the site. (Example: 1)
- username – Retrieves the username of the user logged into the site. (Example: AliVeli)
- password – Retrieves the password of the user logged into the site in encrypted form. (Example: 1575c0734578538326)
- salt – Retrieves the salt value of the user logged into the site. (Example: 5kVI8A7U)
- email – Retrieves the email address of the user logged into the site. (Example: example@gmail.com)
- postnum – Retrieves the post number of the user logged into the site. (Example: 100)
- avatar – Retrieves the avatar of the user logged into the site. (Example: ./directory/avatar.jpg?dateline=#)
- avatardimensions – Retrieves the avatar dimensions of the user logged into the site. ‘|’ (Example: 200|200)
- avatartype – Retrieves the avatar type of the user logged into the site. (Example: upload)
- usergroup – Retrieves the user group of the user logged into the site. (Example: 4)
- additionalgroups – Retrieves the additional user groups of the user logged into the site. (Example: 3,2)
- displaygroup – Retrieves the displayed user group of the user logged into the site. (Example: 4)
- usertitle – Retrieves the user title of the user logged into the site. (Example: MyBB Staff)
- regdate – Retrieves the registration date of the user logged into the site in php time() format. (Example: 1394565678)
- lastactive – Retrieves the last active time of the user logged into the site in php time() format. (Example: 1387347924)
- lastvisit – Retrieves the last visit date of the user logged into the site in php time() format. (Example: 1383729820)
- lastpost – Retrieves the time the user logged into the site last posted in php time() format. (Example: 1383792830)
- website – Retrieves the website of the user logged into the site. (Example: http://www.mybb.com)
- icq, msn, aim, yahoo – Retrieves the icq, msn, aim, yahoo username of the user logged into the site. (Example: miah)
- birthday – Retrieves the birthday of the user logged into the site. (Example: 1-12-1990 [gün-ay-yıl])
- birthdayprivacy – Retrieves the birthday privacy of the user logged into the site. (Example: all)
- signature – Retrieves the signature of the user logged into the site. (Example: Miah’s Signature)
- allownotices – Retrieves the notification settings of the user logged into the site.
- invisible – Retrieves the privacy setting of the user logged into the site. (1 = On, 0 = Off – Example: 1)
- receivepms – Retrieves the number of private messages received by the user logged into the site. (Example: 1)
- showsigs, showavatars, showquickreply, showredirect – Retrieves the user settings of the user logged into the site. (Example: 1)
- referrals – Retrieves the referral count of the user logged into the site. (Example: 2)
- reputation – Retrieves the reputation count of the user logged into the site. (Example: 392)
- regip – Retrieves the IP address the user logged into the site registered with. (Example: 127.0.0.1)
- lastip – Retrieves the IP address the user logged into the site last logged in from. (Example: 127.0.0.1)
- timeonline – Retrieves the total time the user logged into the site has been active in php time() format. (Example: 1383792830)
- totalpms – Retrieves the total number of private messages of the user logged into the site. (Example: 42)
- unreadpms – Retrieves the total number of unread private messages of the user logged into the site. (Example: 10)
- warningpoints – Retrieves the total warning points of the user logged into the site. (Example: 1)
Version $mybb->version
- Retrieves the Mybb version being used.
User Group Variables $mybb->usergroup[‘xxx’]
- disporder – Retrieves the display order of the user group. (Example: 0)
- isbannedgroup – Retrieves whether the user group is a banned group (Example: 1)
- canview – Retrieves the user group’s permission to view the forum. (Example: 1)
- canviewthreads – Retrieves the user group’s permission to view threads. (Example: 1)
- canviewprofiles – Retrieves the user group’s permission to view profiles. (Example: 1)
- candlattachments – Retrieves the user group’s permission to view attachments. (Example: 1)
- canpostthreads – Retrieves the user group’s permission to post threads. (Example: 1)
- canpostreplys – Retrieves the user group’s permission to post replies. (Example: 1)
- canpostattachments – Retrieves the user group’s permission to post attachments. (Example: 1)
- canratethreads – Retrieves the user group’s permission to rate threads (Example: 1)

Share your experience
Got a question, a different solution or a note to add?
Log in or join us to write a comment.
Log in ↗︎Sign up ↗︎