/** * Execute this method for check potential possibility get access token. * @return bool * @throws \Bitrix\Main\LoaderException */ public function checkAccessibleTokenService() { if (!Loader::includeModule('socialservices')) { $this->errorCollection->add(array(new Error(Loc::getMessage('DISK_GOOGLE_HANDLER_ERROR_NOT_INSTALLED_SOCSERV'), self::ERROR_NOT_INSTALLED_SOCSERV))); return false; } $authManager = new \CSocServAuthManager(); $socNetServices = $authManager->getActiveAuthServices(array()); return !empty($socNetServices[\CSocServGoogleOAuth::ID]); }