• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_main.php
  • Класс: CVoxImplantMain
  • Вызов: CVoxImplantMain::GetOneTimeKey
public function GetOneTimeKey($key)
{
	$ViAccount = new CVoxImplantAccount();
	$accountName = $ViAccount->GetAccountName();
	if (!$accountName)
	{
		$this->error = new CVoxImplantError(__METHOD__, $ViAccount->GetError()->code, GetMessage('VI_GET_ACCOUNT_INFO', Array('#CODE#' => $ViAccount->GetError()->code)));
		return false;
	}

	$ViUser = new CVoxImplantUser();
	$userInfo = $ViUser->GetUserInfo($this->userId);
	if (!$userInfo)
	{
		$this->error = new CVoxImplantError(__METHOD__, $ViUser->GetError()->code, GetMessage('VI_GET_USER_INFO', Array('#CODE#' => $ViUser->GetError()->code)));
		return false;
	}

	return md5($key."|".md5($userInfo['user_login'].":voximplant.com:".$userInfo['user_password']));
}