private function createUser($socialUser)
    {
        $user = [
            'name' => $this->validName($socialUser),
            'email' => $socialUser->email,
        ];
        if ($this->username() === 'username') {
            $user['username'] = $socialUser->nickname;
        }
        $userClass = $this->userModel();
        return $userClass::create($user);
    }
private function createUser($socialUser)
    {
        $user = [
            'name' => $this->validName($socialUser),
            'email' => $socialUser->email,
        ];
        if ($this->username() === 'username') {
            $user['username'] = $socialUser->nickname;
        }
        $userClass = $this->userModel();
        return $userClass::create($user);
    }
private function createUser ( $ socialUser ) { $ user = [ 'name' => $ this -> validName ( $ socialUser ) , 'email' => $ socialUser -> email , ] ; if ( $ this -> username ( ) === 'username' ) { $ user [ 'username' ] = $ socialUser -> nickname ; } $ userClass = $ this -> userModel ( ) ; return $ userClass :: create ( $ user ) ; }
Create regular user.

@param $socialUser
@return mixed
Create regular user .