update php Dockerfile

This commit is contained in:
xiaomlove
2025-05-06 11:18:48 +07:00
parent 9a3daabf18
commit ea0f49bc46
5 changed files with 29 additions and 7 deletions
+6 -2
View File
@@ -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;
}