MyBB Community Forums

Full Version: Change username donator only
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do I make 'Change Username' @ User CP only visible for donators?
(Group id 4)

I guess I have to change something at usercp_changename don't know what exactly. Heres the full code of my usercp_changename:

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->change_username}</title>
{$headerinclude}
</head>
<body>
{$header}
<form action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<table width="100%" border="0" align="center">
<tr>
{$usercpnav}
<td valign="top">
{$errors}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->change_username}</strong></td>
</tr>
<tr>
<td class="tcat" colspan="2"><strong>{$lang->current_password}</strong></td>
</tr>
<tr>
<td class="trow1" colspan="2" align="center"><input type="password" class="textbox" name="password" size="25" /></td>
</tr>
<tr>
<td class="tcat" colspan="2"><strong>{$lang->change_username}</strong></td>
</tr>
<tr>
<td class="trow2" width="40%"><strong>{$lang->new_username}</strong></td>
<td class="trow2" width="60%"><input type="text" class="textbox" name="username" size="25" maxlength="{$mybb->settings['maxnamelength']}" /></td>
</tr>
</table>
<br />
<div align="center">
<input type="hidden" name="action" value="do_changename" />
<input type="submit" class="button" name="submit" value="{$lang->update_username}" />
</div>
</td>
</tr>
</table>
</form>
{$footer}
</body>
</html>


Thanks in advance.
You can disable the permission for other groups and enable it for the donator group.

So for all groups go to: Acp -> Users & Groups -> Groups -> Select the non-donator groups -> go to the tab "Users & Permissions" and UNCHECK the box:

Can change username?

Repeat for all non-donator groups & for the donator group CHECK this box.

Now no one but donators can see the change username link in the user cp.