feat: update Wordpress OAuth provider
This commit is contained in:
parent
a2542e7716
commit
b810d52e59
|
@ -134,12 +134,20 @@ class WordPress extends OAuth2
|
|||
/**
|
||||
* Check if the OAuth email is verified
|
||||
*
|
||||
* @link https://developer.wordpress.com/docs/api/1.1/get/me/
|
||||
*
|
||||
* @param $accessToken
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmailVerified(string $accessToken): bool
|
||||
{
|
||||
$user = $this->getUser($accessToken);
|
||||
|
||||
if (isset($user['email_verified']) && $user['email_verified'] === true) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue