Fix: Return primary email address, not the first #360

merged 1 commit into from Dec 7, 2014


None yet

3 participants


When a user has multiple email addresses, the first doesn't necessarily have to be the primary email address.

        "email": "",
        "verified": true,
        "primary": false
        "email": "",
        "verified": true,
        "primary": true

This PR fixes Hybrid_Providers_GitHub::getUserProfile() by iterating over the array of email addresses to find the one that is the primary email address.

@localheinz localheinz referenced this pull request in zendframework/ Dec 7, 2014

When signing up and having multiple email addresses, not the primary one is used #257


Thank you!

@StorytellerCZ StorytellerCZ merged commit 391783f into hybridauth:master Dec 7, 2014
@localheinz localheinz deleted the localheinz:fix/return-primary-email-address branch Dec 7, 2014

@AdwinTrave - do you have a release planned with this fix? I would do it but haven't been as involved and don't want to step on your toes.


@StorytellerCZ StorytellerCZ added this to the 2.x milestone Dec 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment