function getConsentUrl($offers, $context = null, $ru = null, $market = null) { if (!$offers) { //throw new Exception('Error: getConsentUrl: Invalid offers list.'); $this->setError('Error: getConsentUrl: Invalid offers list.'); return false; } $url = WindowsLiveLogin::getConsentBaseUrl(); $url .= 'Delegation.aspx?ps=' . urlencode($offers); $ru = $ru ? $ru : WindowsLiveLogin::getReturnUrl(); $url .= $ru ? '&ru=' . urlencode($ru) : ''; $pl = WindowsLiveLogin::getPolicyUrl(); $url .= $pl ? '&pl=' . urlencode($pl) : ''; $url .= $market ? '&mkt=' . urlencode($market) : ''; if (!$this->_force_delauth_nonprovisioned) { $url .= '&app=' . WindowsLiveLogin::getAppVerifier(); } $url .= $context ? '&appctx=' . urlencode($context) : ''; return $url; }