public function generateSocialOnlyUser($email, $roles)
    {
        $user = static::firstOrCreate(compact('email'));

        $user->setStatus(Status::ACTIVE);
        $user->assignRole($roles);
        $user->trackTime('invited_at');

        Detail::firstOrCreate([
            'user_id'      => $user->id,
            'display_name' => $email,
        ]);

        return $user;
    }
public function generateSocialOnlyUser($email, $roles)
    {
        $user = static::firstOrCreate(compact('email'));

        $user->setStatus(Status::ACTIVE);
        $user->assignRole($roles);
        $user->trackTime('invited_at');

        Detail::firstOrCreate([
            'user_id'      => $user->id,
            'display_name' => $email,
        ]);

        return $user;
    }
public function generateSocialOnlyUser ( $ email , $ roles ) { $ user = static :: firstOrCreate ( compact ( 'email' ) ) ; $ user -> setStatus ( Status :: ACTIVE ) ; $ user -> assignRole ( $ roles ) ; $ user -> trackTime ( 'invited_at' ) ; Detail :: firstOrCreate ( [ 'user_id' => $ user -> id , 'display_name' => $ email , ] ) ; return $ user ; }
Create a user to allow access.

@param string                             $email
@param collection|object|array|string|int $roles

@return \App\Models\User
Create a user to allow access .