Skip to content

Commit

Permalink
Fixed a user potentially being able to delete themselves if they real…
Browse files Browse the repository at this point in the history
…ly really wanted to.

#282
  • Loading branch information
timbuckingham committed May 25, 2017
1 parent c17d09b commit f789970
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/inc/bigtree/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,8 @@ function deleteUser($id) {
$id = sqlescape($id);
// If this person has higher access levels than the person trying to update them, fail.
$current = static::getUser($id);
if ($current["level"] > $this->Level) {

if ($current["level"] > $this->Level || $id == $this->ID) {
return false;
}

Expand Down

0 comments on commit f789970

Please sign in to comment.