fix change user class + medal display

This commit is contained in:
xiaomlove
2023-01-10 17:25:53 +08:00
parent 3612edbb5b
commit d7d63c8fd2
20 changed files with 249 additions and 16 deletions

View File

@@ -471,7 +471,8 @@ class UserRepository extends BaseRepository
user_can('user-change-class', true);
$operator = $this->getUser($operator);
$targetUser = $this->getUser($targetUser);
if ($operator && $operator->class <= $targetUser->class) {
if ($operator) {
if ($operator->class <= $targetUser->class || $operator->class <= $newClass)
throw new InsufficientPermissionException();
}
if ($targetUser->class == $newClass) {