@@ -235,7 +235,7 @@ |
||
| 235 | 235 | */ |
| 236 | 236 | public function getTraitsAttribute(): array |
| 237 | 237 | { |
| 238 | - if(array_key_exists('rank', $this->attributes) && $this->attributes['rank'] >= 6) |
|
| 238 | + if (array_key_exists('rank', $this->attributes) && $this->attributes['rank'] >= 6) |
|
| 239 | 239 | return ["STAFF"]; |
| 240 | 240 | |
| 241 | 241 | return $this->traits; |
@@ -235,8 +235,9 @@ discard block |
||
| 235 | 235 | */ |
| 236 | 236 | public function getTraitsAttribute(): array |
| 237 | 237 | { |
| 238 | - if(array_key_exists('rank', $this->attributes) && $this->attributes['rank'] >= 6) |
|
| 239 | - return ["STAFF"]; |
|
| 238 | + if(array_key_exists('rank', $this->attributes) && $this->attributes['rank'] >= 6) { |
|
| 239 | + return ["STAFF"]; |
|
| 240 | + } |
|
| 240 | 241 | |
| 241 | 242 | return $this->traits; |
| 242 | 243 | } |
@@ -248,8 +249,9 @@ discard block |
||
| 248 | 249 | */ |
| 249 | 250 | public function getTrustedAttribute(): bool |
| 250 | 251 | { |
| 251 | - if (UserSecurity::find($this->attributes['id']) == null) |
|
| 252 | - return true; |
|
| 252 | + if (UserSecurity::find($this->attributes['id']) == null) { |
|
| 253 | + return true; |
|
| 254 | + } |
|
| 253 | 255 | |
| 254 | 256 | return in_array($this->attributes['ip_current'], |
| 255 | 257 | UserSecurity::find($this->attributes['id'])->trustedDevices); |