Skip to content

Commit

Permalink
fixing resource owner name
Browse files Browse the repository at this point in the history
  • Loading branch information
ursuleacv committed Nov 12, 2016
1 parent 190beb9 commit 6a9f8c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Add the following to your `composer.json` file.
```json
{
"require": {
"KangarooRewards/oauth2-kangaroo-rewards": "~1.0"
"kangaroorewards/oauth2-kangaroo-rewards": "~1.0"
}
}
```
Expand Down
3 changes: 2 additions & 1 deletion src/Provider/KangarooResourceOwner.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public function getId()
*/
public function getName()
{
return $this->response['data']['profile']['name'] ?: null;
$profile = $this->response['data']['profile'] ?: null;
return $profile ? $profile['first_name'] . ' ' . $profile['last_name'] : null;
}

/**
Expand Down

0 comments on commit 6a9f8c9

Please sign in to comment.