Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Vkontakte fields to configuration #477

Merged
merged 4 commits into from
May 25, 2015

Conversation

trogwarz
Copy link
Contributor

  1. Now you can use HybridAuth config to set fields that will be taken from VKontakte for users.get and friends.get
  2. Refactor code to use api_base_url from \OAuth2Client

@nazar-pc
Copy link
Contributor

This doesn't seem to be backward compatible.
Maybe, better assume old fields by default, but allow to redefine it using configuration?

@trogwarz
Copy link
Contributor Author

@nazar-pc, can you provide example when it breaks something? I'll fix this shortly.

But i think they are backward-compatible. PR just add some new fields, but not removes old (see code below).
All fields, that defined in \Hybrid_User_Contact but not got from Vkontakte, wil be null but they will exist.

public $fields = [
    'identifier'  => 'uid',            // Old field saved
    'firstName'   => 'first_name',     // Old field saved
    'lastName'    => 'last_name',      // Old field saved
    'gender'      => 'sex',            // Old field saved
    'displayName' => 'screen_name',    // Old field saved
    'city'        => 'city',           // New one
    'country'     => 'country',        // New one
    'bdate'       => 'bdate',          // Old field saved
    'photoURL'    => 'photo_max_orig', // Old field saved
    'nickname'    => 'nickname',       // Old field saved
    'domain'      => 'domain',         // New one
    'timezone'    => 'timezone',       // Old field saved
    'photo_rec'   => 'photo_rec',      // Old field saved
    'photo_max'   => 'photo_max',      // New one
    'home_phone'  => 'home_phone',     // New one
    'home_town'   => 'home_town',      // Old field saved
];

@trogwarz
Copy link
Contributor Author

Okay, i've changed field map to make compability more clear. Check this out, please.

@nazar-pc
Copy link
Contributor

Ah, sorry, looks like I understood it wrong, seems to be fine indeed, did you test it (because I didn't yet)?

@trogwarz
Copy link
Contributor Author

Yep, i use this code in my project and tested compability version from master and from my PR. It's good, just added new fields.
Now i've added more comments to fields map.

miled added a commit that referenced this pull request May 25, 2015
Move Vkontakte fields to configuration
@miled miled merged commit a7933d5 into hybridauth:master May 25, 2015
@StorytellerCZ StorytellerCZ added this to the 2.x milestone May 27, 2015
StorytellerCZ pushed a commit that referenced this pull request Sep 7, 2015
2.5.0 - September 7 2015
      New:
        #444 + #445 - Slack provider
        $474 - WarGaming OpenID provider
        #454 - xuite's oauth provider
        #480 - Improved inline documentation for IDE support
        #370 + #495 - [github] getUserContacts() implementation
(followers & following)
        #372 + #495 - [instagram] getUserContacts() implementation
(follows & followed-by)
        #519 - [Twitter] Add email option to Twitter API
      Fixes:
        #438 + #445 - [LinkedIn] getusercontacts error
        #446 + #447 - [Steam] xml parsing error
        #340 + #476 - Ensure session is saved before sending response
        #472 - [Facebook] Obsolete 'read_friendlists' FB permission was
changed to 'read_custom_friendlists'
        #453 - [Vkontakte] fix Undefined property: stdClass::$email
        #499 + #500 - [Facebook] Bug: treating hometown as current
location
        #523 - [Draugiem] API does not always return the birthday object
        #525 - [Facebook] Fixes getUserProfile v2.4 compatibility
        #532 + #533 [soundcloud] Provider doesn't implement
getUserProfile() and getUserContacts()
        #535 - [Draugiem] API does not always return the birthday object
      Changes:
        #477 - [Vkontakte] Move Vkontakte fields to configuration
        71531f2 - [Facebook] Adding birthday field to be retrieved
      Removed:
        #455 - [Viadeo] Viadeo connect not existing anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants