Sometimes, VKontakte sets user IDentificator as uid or id – use both of them in ID getter

This commit is contained in:
trogwar
2016-07-01 17:43:00 +03:00
committed by Jack Wall
parent 4ea360a0d1
commit 5596bc7350

View File

@@ -39,7 +39,7 @@ class User implements ResourceOwnerInterface
*/ */
public function getId() public function getId()
{ {
return (int)$this->response['uid']; return (int)($this->getField('uid') ?: $this->getField('id'));
} }
// ========== helpers ========== // ========== helpers ==========