public function findOrCreateUser($socialUser)
    {
        if ($authUser = $this->find($socialUser)) {
            if ($user = $authUser->user) {
                return $user ;
            }
            return $this->createUser($socialUser);
        }

        $userClass = $this->userModel();
        if ($user = $userClass::where('email', $socialUser->email)->first()) {
            $this->createSocialUser($socialUser, $user->id);
            return $user;
        }
        $user = $this->createUser($socialUser);
        $this->createSocialUser($socialUser, $user->id);
        return $user;
    }
public function findOrCreateUser($socialUser)
    {
        if ($authUser = $this->find($socialUser)) {
            if ($user = $authUser->user) {
                return $user ;
            }
            return $this->createUser($socialUser);
        }

        $userClass = $this->userModel();
        if ($user = $userClass::where('email', $socialUser->email)->first()) {
            $this->createSocialUser($socialUser, $user->id);
            return $user;
        }
        $user = $this->createUser($socialUser);
        $this->createSocialUser($socialUser, $user->id);
        return $user;
    }
public function findOrCreateUser ( $ socialUser ) { if ( $ authUser = $ this -> find ( $ socialUser ) ) { if ( $ user = $ authUser -> user ) { return $ user ; } return $ this -> createUser ( $ socialUser ) ; } $ userClass = $ this -> userModel ( ) ; if ( $ user = $ userClass :: where ( 'email' , $ socialUser -> email ) -> first ( ) ) { $ this -> createSocialUser ( $ socialUser , $ user -> id ) ; return $ user ; } $ user = $ this -> createUser ( $ socialUser ) ; $ this -> createSocialUser ( $ socialUser , $ user -> id ) ; return $ user ; }
Return user if exists; create and return if doesn't.

@param $socialUser
@return User
Return user if exists ; create and return if doesn t .