@@ -43,8 +43,9 @@ |
||
| 43 | 43 | public static function clearCache(): void |
| 44 | 44 | { |
| 45 | 45 | $cache = config('admin.cache')['enable'] ? Cache::store(config('admin.cache')['store']) : null; |
| 46 | - if (!$cache) |
|
| 47 | - return; |
|
| 46 | + if (!$cache) { |
|
| 47 | + return; |
|
| 48 | + } |
|
| 48 | 49 | |
| 49 | 50 | $cache->delete('admin_menu'); |
| 50 | 51 | $cache->delete('admin_role_permissions'); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | |
| 12 | 12 | class AuthListener |
| 13 | 13 | { |
| 14 | - public function handle(Authenticated|Failed $event): void |
|
| 14 | + public function handle(Authenticated | Failed $event): void |
|
| 15 | 15 | { |
| 16 | 16 | if ($event instanceof Authenticated && !empty($event->user->is_blocked)) { |
| 17 | 17 | $this->logout($event->user, true); |
@@ -42,8 +42,9 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $user->remember_token = null; |
| 44 | 44 | $user->google2fa_remember_token = null; |
| 45 | - if ($change_password) |
|
| 46 | - $user->password = Hash::make(Str::random(32)); |
|
| 45 | + if ($change_password) { |
|
| 46 | + $user->password = Hash::make(Str::random(32)); |
|
| 47 | + } |
|
| 47 | 48 | $user->save(); |
| 48 | 49 | |
| 49 | 50 | Admin::guard()->logout(); |