Skip to content

Commit

Permalink
Use $me
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarwood007 committed Dec 4, 2023
1 parent a3a8c58 commit 423d07d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -3176,17 +3176,17 @@ public static function delete(int|array $users, bool $check_not_admin = false):
list($user) = $users;

if ($user == User::$me->id) {
self::isAllowedTo('profile_remove_own');
self::$me->isAllowedTo('profile_remove_own');
} else {
self::isAllowedTo('profile_remove_any');
self::$me->isAllowedTo('profile_remove_any');
}
} else {
foreach ($users as $k => $v) {
$users[$k] = (int) $v;
}

// Deleting more than one? You can't have more than one account...
self::isAllowedTo('profile_remove_any');
self::$me->isAllowedTo('profile_remove_any');
}

// Get their names for logging purposes.
Expand Down

0 comments on commit 423d07d

Please sign in to comment.