@@ -47,8 +47,9 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | protected function upsertUser($profile) |
| 49 | 49 | { |
| 50 | - if (!isset($profile->user_id)) |
|
| 51 | - throw new Exception("Missing token information: Auth0 user id is not set"); |
|
| 50 | + if (!isset($profile->user_id)) { |
|
| 51 | + throw new Exception("Missing token information: Auth0 user id is not set"); |
|
| 52 | + } |
|
| 52 | 53 | |
| 53 | 54 | $identifier = explode('|', $profile->user_id); |
| 54 | 55 | $identityProvider = $identifier[0]; |
@@ -59,8 +60,9 @@ discard block |
||
| 59 | 60 | if ($user === null || !$this->userEqualsProfile($user, $profile)) { |
| 60 | 61 | try { |
| 61 | 62 | |
| 62 | - if ($user === null) |
|
| 63 | - $user = new User(); |
|
| 63 | + if ($user === null) { |
|
| 64 | + $user = new User(); |
|
| 65 | + } |
|
| 64 | 66 | |
| 65 | 67 | $user->_id = new ObjectId($id); |
| 66 | 68 | $user->provider = $identityProvider; |
@@ -46,8 +46,9 @@ |
||
| 46 | 46 | public function delete($id): bool |
| 47 | 47 | { |
| 48 | 48 | $deleted = User::delete($id); |
| 49 | - if ($deleted) |
|
| 50 | - Cache::forget($this->getCacheName($id)); |
|
| 49 | + if ($deleted) { |
|
| 50 | + Cache::forget($this->getCacheName($id)); |
|
| 51 | + } |
|
| 51 | 52 | return $deleted; |
| 52 | 53 | } |
| 53 | 54 | |