Skip to content

Commit

Permalink
Disable deletion your own account
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Jan 17, 2022
1 parent 6ad1349 commit 78413af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lhc_web/modules/lhuser/delete.php
Expand Up @@ -5,6 +5,11 @@
exit;
}

if ($currentUser->getUserID() == $Params['user_parameters']['user_id']) {
die('You can not delete your own account!');
exit;
}

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

Expand Down

0 comments on commit 78413af

Please sign in to comment.