20-02-2026
This commit is contained in:
parent
854ce02bf6
commit
4d6b4930b2
128 changed files with 18247 additions and 2093 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Actions\Fortify;
|
||||
|
||||
use App\Enums\UserOrigin;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
|
@ -31,10 +32,15 @@ class CreateNewUser implements CreatesNewUsers
|
|||
'password' => $this->passwordRules(),
|
||||
])->validate();
|
||||
|
||||
$theme = config('app.theme', '');
|
||||
$origin = UserOrigin::tryFrom($theme);
|
||||
|
||||
return User::create([
|
||||
'name' => $input['name'],
|
||||
'email' => $input['email'],
|
||||
'password' => Hash::make($input['password']),
|
||||
'origin' => $origin?->value,
|
||||
'hub_id' => $input['hub_id'] ?? null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue