function getTrustedToken($user) { if (!$user) { WindowsLiveLogin::debug('Error: getTrustedToken: Null user specified.'); return; } $token = "appid=" . WindowsLiveLogin::getAppId() . "&uid=" . urlencode($user) . "&ts=" . WindowsLiveLogin::getTimestamp(); $token .= "&sig=" . WindowsLiveLogin::e64(WindowsLiveLogin::signToken($token)); return urlencode($token); }