MyBB Community Forums

Full Version: User Titles?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What value shows the user title like when it's empty it takes it from User Titles!

Newbie
Junior Member
Member
Senior Member
Posting Freak
Posting Legent

The query to usertitle only will show a custom title !
What have you tried? Assuming you did.
$mybb->user['usertitle']

doesn't show any titles like you see on postbit!
When usertitle is set, this is displayed. When usertitle is not set, displaygroup is displayed and when displaygroup is not set, usergroup is displayed.
All other usergroups of a user are stored in additionalgroups as comma seperated group numbers.
Any ideas how grab the title from (user titles feature) when the user title is empty and show? Point me in the right direction please?

Where can I find it in the source code so that I can backtrack it?
I think it must be something like this:

$usergroups_cache = $cache->read('usergroups');
if (trim($user['usertitle']) != '')
{
	$usertitle = $user['usertitle'];
}
elseif ($user['displaygroup'] > 0)
{
	$usertitle = $usergroups_cache[$user['displaygroup']]['usertitle'];
}
else
{
	$usertitle = $usergroups_cache[$user['usergroup']]['usertitle'];
}
Buddy thanks big time +1 The Problem is it reads groups not title!