You've already forked Epicnabbo-Catalogus-Updated-Daily
🆙 phpstan done an refactoring 🆙
This commit is contained in:
@@ -52,12 +52,18 @@ class CreateNewUser implements CreatesNewUsers
|
||||
]);
|
||||
}
|
||||
|
||||
$this->validate($input);
|
||||
$validated = $this->validate($input);
|
||||
|
||||
if (! is_string($validated['username']) || ! is_string($validated['mail']) || ! is_string($validated['password'])) {
|
||||
throw ValidationException::withMessages([
|
||||
'registration' => __('Invalid registration data types'),
|
||||
]);
|
||||
}
|
||||
|
||||
$user = User::create([
|
||||
'username' => $input['username'],
|
||||
'mail' => $input['mail'],
|
||||
'password' => Hash::make((string) $input['password']),
|
||||
'username' => $validated['username'],
|
||||
'mail' => $validated['mail'],
|
||||
'password' => Hash::make($validated['password']),
|
||||
'account_created' => time(),
|
||||
'last_login' => time(),
|
||||
'motto' => setting('start_motto') ?: 'Welcome to the hotel!',
|
||||
|
||||
Reference in New Issue
Block a user