mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/8777] Discourage deleting user with only one group
It will still be possible from the manage groups page though is discouraged now by hiding the delete entry when managing users. In addition to this, the manage user page will now show that no group is specified for the user when viewing the groups page of a user. PHPBB3-8777
This commit is contained in:
parent
5f825002b6
commit
cca85f648b
2 changed files with 6 additions and 2 deletions
|
@ -137,9 +137,13 @@
|
|||
<td><a href="{group.U_EDIT_GROUP}">{group.GROUP_NAME}</a></td>
|
||||
<td><!-- IF group.S_IS_MEMBER --><!-- IF group.S_NO_DEFAULT --><a href="{group.U_DEFAULT}">{L_GROUP_DEFAULT}</a><!-- ELSE --><strong>{L_GROUP_DEFAULT}</strong><!-- ENDIF --><!-- ELSEIF not group.S_IS_MEMBER and group.U_APPROVE --><a href="{group.U_APPROVE}">{L_GROUP_APPROVE}</a><!-- ELSE --> <!-- ENDIF --></td>
|
||||
<td><!-- IF group.S_IS_MEMBER and not group.S_SPECIAL_GROUP --><a href="{group.U_DEMOTE_PROMOTE}">{group.L_DEMOTE_PROMOTE}</a><!-- ELSE --> <!-- ENDIF --></td>
|
||||
<td><a href="{group.U_DELETE}">{L_GROUP_DELETE}</a></td>
|
||||
<td>{% if group.U_DELETE %}<a href="{{ group.U_DELETE }}">{{ lang('GROUP_DELETE') }}</a>{% endif %}</td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td class="row3 centered-text" colspan="4">{{ lang('NO_GROUP') }}</td>
|
||||
</tr>
|
||||
<!-- END group -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -2515,7 +2515,7 @@ class acp_users
|
|||
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&mode=manage&action=edit&u=$user_id&g={$data['group_id']}&back_link=acp_users_groups"),
|
||||
'U_DEFAULT' => $this->u_action . "&action=default&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'),
|
||||
'U_DEMOTE_PROMOTE' => $this->u_action . '&action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'),
|
||||
'U_DELETE' => $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'],
|
||||
'U_DELETE' => count($id_ary) > 1 ? $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'] : '',
|
||||
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '',
|
||||
|
||||
'GROUP_NAME' => $group_helper->get_name($data['group_name']),
|
||||
|
|
Loading…
Add table
Reference in a new issue