Topic: .
.
You are not logged in. Please login or register.
.
I got it
These are the defined constants
define('PUN_ADMIN', 1);
define('PUN_MOD', 2);
define('PUN_GUEST', 3);
define('PUN_MEMBER', 4);
The line to check to see if the user can change titles is
if ($pun_user['g_set_title'] == '1' || $pun_user['g_id'] < PUN_GUEST)
$title_field = '<label>'.$lang_common['Title'].' (<em>'.$lang_profile['Leave blank'].'</em>)<br /><input type="text" name="title" value="'.pun_htmlspecialchars($user['title']).'" size="30" maxlength="50" /><br /></label>'."\n";
PUN_MOD (2) is greater then PUN_GUEST (3).
So change that to
if ($pun_user['g_set_title'] == '1' || $pun_user['g_id'] == PUN_ADMIN)
$title_field = '<label>'.$lang_common['Title'].' (<em>'.$lang_profile['Leave blank'].'</em>)<br /><input type="text" name="title" value="'.pun_htmlspecialchars($user['title']).'" size="30" maxlength="50" /><br /></label>'."\n";
This will let admins change titles, but not moderatorss.
Oh, yeah, duh..
Thats profile.php. I was just stating why it was doing this, not really how to fix it.
There is 2 parts you have to fix. One is when it displays the title field, the other is where updates it.
Will this be fixed in future versions?
Yes.
Actually, you can get away with just
if ($pun_user['g_set_title'] == '1')
since Administrators always have this permission. You need to edit another line as well. Here's the fix in Subversion.
Powered by PunBB, supported by Informer Technologies, Inc.