Skip to content
Permalink
Browse files Browse the repository at this point in the history
Display logic should match backand logic
  • Loading branch information
remdex committed Jan 18, 2022
1 parent a0fd5b4 commit cc1122a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lhc_web/modules/lhuser/delete.php
Expand Up @@ -10,6 +10,11 @@
exit;
}

if ((int)$Params['user_parameters']['user_id'] == 1) {
die('admin account never can be deleted!');
exit;
}

$departament = erLhcoreClassUser::getSession()->load( 'erLhcoreClassModelUser', $Params['user_parameters']['user_id']);
erLhcoreClassUser::getSession()->delete($departament);

Expand Down
5 changes: 5 additions & 0 deletions lhc_web/modules/lhuser/deletegroup.php
Expand Up @@ -5,6 +5,11 @@
exit;
}

if ((int)$Params['user_parameters']['group_id'] == 1) {
die('admin account never can be deleted!');
exit;
}

erLhcoreClassGroup::deleteGroup((int)$Params['user_parameters']['group_id']);

erLhcoreClassAdminChatValidatorHelper::clearUsersCache();
Expand Down

0 comments on commit cc1122a

Please sign in to comment.