mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-21 02:20:54 +08:00
update php Dockerfile
This commit is contained in:
+6
-2
@@ -277,11 +277,15 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
|
||||
public function checkIsNormal(array $fields = ['status', 'enabled']): bool
|
||||
{
|
||||
$params = [
|
||||
'user_id' => $this->id,
|
||||
'username' => $this->username,
|
||||
];
|
||||
if (in_array('status', $fields) && $this->getAttribute('status') != self::STATUS_CONFIRMED) {
|
||||
throw new NexusException(nexus_trans("user.user_is_not_confirmed", ['user_id' => $this->id, 'username' => $this->username]));
|
||||
throw new NexusException(nexus_trans("user.user_is_not_confirmed", $params));
|
||||
}
|
||||
if (in_array('enabled', $fields) && $this->getAttribute('enabled') != self::ENABLED_YES) {
|
||||
throw new NexusException(nexus_trans("user.user_is_disabled", ['user_id' => $this->id, 'username' => $this->username]));
|
||||
throw new NexusException(nexus_trans("user.user_is_disabled", $params));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user