MyBB Community Forums

Full Version: How do I search for a user's usertitle?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to post a custom message to people who have not posted yet on my forums (to encourage them to make their first post). To do this I'm using PHP to search for usergroup titles:

if($mybb->usertitle['utid'] == 1){  // if a user's usertitle id is equal to one

//display my custom message

}


The '1' utid is associated with people how have a post counter of zero. This code however is not working becuase usertitle['utid'] is null. I assumed the variable is 'usertitle['utid']' but I guess it's something else. What's the correct variable to use here to search for a user's usertitle?
user group (number) => $mybb->user['usergroup']

why not use user posts number ! $mybb->user['postnum']
(2016-05-03, 01:57 AM).m. Wrote: [ -> ]user group (number) => $mybb->user['usergroup']

why not use user posts number ! $mybb->user['postnum']

Yea, post number will work. Thanks.