src/Http/Controllers/Tenantarea/SocialAuthenticationController.php
protected function createLocalUser(string $provider, array $attributes)
    {
        $localUser = app('cortex.auth.member');

        $attributes['password'] = str_random();
        $attributes['email_verified_at'] = now();
        $attributes['is_active'] = ! config('cortex.auth.registration.moderated');

        $localUser->fill($attributes)->save();

        // Fire the register success event
        event(new Registered($localUser));

        $localUser->socialites()->create([
            'provider' => $provider,
            'provider_uid' => $attributes['id'],
        ]);

        return $localUser;
    }
protected function createLocalUser(string $provider, array $attributes)
    {
        $localUser = app('cortex.auth.member');

        $attributes['password'] = str_random();
        $attributes['email_verified_at'] = now();
        $attributes['is_active'] = ! config('cortex.auth.registration.moderated');

        $localUser->fill($attributes)->save();

        // Fire the register success event
        event(new Registered($localUser));

        $localUser->socialites()->create([
            'provider' => $provider,
            'provider_uid' => $attributes['id'],
        ]);

        return $localUser;
    }
protected function createLocalUser ( string $ provider , array $ attributes ) { $ localUser = app ( 'cortex.auth.member' ) ; $ attributes [ 'password' ] = str_random ( ) ; $ attributes [ 'email_verified_at' ] = now ( ) ; $ attributes [ 'is_active' ] = ! config ( 'cortex.auth.registration.moderated' ) ; $ localUser -> fill ( $ attributes ) -> save ( ) ; // Fire the register success event event ( new Registered ( $ localUser ) ) ; $ localUser -> socialites ( ) -> create ( [ 'provider' => $ provider , 'provider_uid' => $ attributes [ 'id' ] , ] ) ; return $ localUser ; }
Create local user for the given provider.

@param string $provider
@param array  $attributes

@return \Illuminate\Database\Eloquent\Model|null
Create local user for the given provider .