Fix no-license UUID bug
This commit fixes a registration bug while license requirements are off. Since the app always expects a UUID, it would error out without one.
This commit is contained in:
@@ -120,16 +120,13 @@ class RegisterController extends Controller
|
||||
protected function create(array $data)
|
||||
{
|
||||
$user = User::create([
|
||||
'uuid' => $data['uuid'],
|
||||
'uuid' => $data['uuid'] ?? "disabled",
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => Hash::make($data['password']),
|
||||
'originalIP' => config('demo.is_enabled') ? '0.0.0.0' : request()->ip(),
|
||||
]);
|
||||
|
||||
// It's not the registration controller's concern to create a profile for the user,
|
||||
// so this code has been moved to its respective observer, following the separation of concerns pattern.
|
||||
|
||||
$user->assignRole('user');
|
||||
|
||||
return $user;
|
||||
|
Reference in New Issue
Block a user