public function __construct($appID = false, $appSecret = false, $code = false) { if ($appID === false) { $appID = trim(CSocServYandexAuth::GetOption("yandex_appid")); } if ($appSecret === false) { $appSecret = trim(CSocServYandexAuth::GetOption("yandex_appsecret")); } parent::__construct($appID, $appSecret, $code); }
/** * Request and store access token (self::accessToken) for self::userId * @return $this */ public function queryAccessToken() { if (!Loader::includeModule('socialservices')) { $this->errorCollection->add(array(new Error(Loc::getMessage('DISK_YANDEX_HANDLER_ERROR_NOT_INSTALLED_SOCSERV'), self::ERROR_NOT_INSTALLED_SOCSERV))); return false; } $yandexOAuth = new \CSocServYandexAuth($this->userId); //this bug. SocServ fill entityOAuth in method getUrl..... $yandexOAuth->getUrl('modal'); $this->accessToken = $yandexOAuth->getStorageToken(); return $this; }