• Модуль: socialservices
  • Путь к файлу: ~/bitrix/modules/socialservices/classes/general/mailru.php
  • Класс: CSocServMyMailRu
  • Вызов: CSocServMyMailRu::getUrl
public function getUrl()
{
	$appID = trim(self::GetOption("mailru_id"));
	$appSecret = trim(self::GetOption("mailru_secret_key"));

	$gAuth = new CMailRuOAuthInterface($appID, $appSecret);

	$redirect_uri = CSocServUtil::GetCurUrl('auth_service_id='.self::ID);
	$state = 'site_id='.SITE_ID.'&backurl='.($GLOBALS["APPLICATION"]->GetCurPageParam('check_key='.CSocServAuthManager::getUniqueKey(), array("logout", "auth_service_error", "auth_service_id", "backurl")));

	return $gAuth->GetAuthUrl($redirect_uri, $state);
}