hybridauth/hybridauth — pull request #360 by localheinz (2014-12-07 17:18:41+00:00)
Title: Fix: Return primary email address, not the first

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

```json
[
{
"email": "john@example.org",
"verified": true,
"primary": false
},
{
"email": "john.doe@example.com",
"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.