attach torrent tags support delete olds

This commit is contained in:
xiaomlove
2022-09-12 22:02:57 +08:00
parent d5e81ac009
commit e5cb98cf35
8 changed files with 29 additions and 21 deletions

View File

@@ -138,7 +138,10 @@ class UserRepository extends BaseRepository
throw new \InvalidArgumentException("password confirmation != password");
}
$user = User::query()->findOrFail($id, ['id', 'username', 'class']);
$this->checkPermission(Auth::user(), $user);
$operator = Auth::user();
if ($operator) {
$this->checkPermission($operator, $user);
}
$secret = mksecret();
$passhash = md5($secret . $password . $secret);
$update = [