public function getAssertionsByEmailAddress($emailAddresses)
	{
		if (!$this->credentialsSet())
		{
			throw new Exception('You need to set the credentials first.');
		}

		if (!is_array($emailAddresses))
		{
			$emailAddresses = array($emailAddresses);
		}

		$query_params = implode('%20', $emailAddresses);
		$url = self::PASSPORT_API_ENDPOINT . "assertions?emailAddresses=" . $query_params;

		if ($this->request_type == 'oauth' && is_a($this->request, 'oauth'))
		{
			$this->request->setAuthType(OAUTH_AUTH_TYPE_URI);
			try
			{
				$this->request->fetch($url, null, OAUTH_HTTP_METHOD_GET, array('Content-Type' => 'application/json'));
			}
			catch (Exception $e)
			{
				throw new Exception('Assertations by email request failed.');
			}

			$response = json_decode($this->request->getLastResponse());
		}
		else if ($this->request_type == 'curl' && get_resource_type($this->request) == 'curl')
		{
			curl_setopt($this->request, CURLOPT_POST, false);
			curl_setopt($this->request, CURLOPT_URL, $url);
			curl_setopt($this->request, CURLOPT_RETURNTRANSFER, true);

			$response = curl_exec($this->request);
			$response = json_decode($response);
		}
		else
		{
			throw new Exception('Unsupported request type');
		}

		return $response;
	}
public function getAssertionsByEmailAddress($emailAddresses)
	{
		if (!$this->credentialsSet())
		{
			throw new Exception('You need to set the credentials first.');
		}

		if (!is_array($emailAddresses))
		{
			$emailAddresses = array($emailAddresses);
		}

		$query_params = implode('%20', $emailAddresses);
		$url = self::PASSPORT_API_ENDPOINT . "assertions?emailAddresses=" . $query_params;

		if ($this->request_type == 'oauth' && is_a($this->request, 'oauth'))
		{
			$this->request->setAuthType(OAUTH_AUTH_TYPE_URI);
			try
			{
				$this->request->fetch($url, null, OAUTH_HTTP_METHOD_GET, array('Content-Type' => 'application/json'));
			}
			catch (Exception $e)
			{
				throw new Exception('Assertations by email request failed.');
			}

			$response = json_decode($this->request->getLastResponse());
		}
		else if ($this->request_type == 'curl' && get_resource_type($this->request) == 'curl')
		{
			curl_setopt($this->request, CURLOPT_POST, false);
			curl_setopt($this->request, CURLOPT_URL, $url);
			curl_setopt($this->request, CURLOPT_RETURNTRANSFER, true);

			$response = curl_exec($this->request);
			$response = json_decode($response);
		}
		else
		{
			throw new Exception('Unsupported request type');
		}

		return $response;
	}
public function getAssertionsByEmailAddress ( $ emailAddresses ) { if ( ! $ this -> credentialsSet ( ) ) { throw new Exception ( 'You need to set the credentials first.' ) ; } if ( ! is_array ( $ emailAddresses ) ) { $ emailAddresses = array ( $ emailAddresses ) ; } $ query_params = implode ( '%20' , $ emailAddresses ) ; $ url = self :: PASSPORT_API_ENDPOINT . "assertions?emailAddresses=" . $ query_params ; if ( $ this -> request_type == 'oauth' && is_a ( $ this -> request , 'oauth' ) ) { $ this -> request -> setAuthType ( OAUTH_AUTH_TYPE_URI ) ; try { $ this -> request -> fetch ( $ url , null , OAUTH_HTTP_METHOD_GET , array ( 'Content-Type' => 'application/json' ) ) ; } catch ( Exception $ e ) { throw new Exception ( 'Assertations by email request failed.' ) ; } $ response = json_decode ( $ this -> request -> getLastResponse ( ) ) ; } else if ( $ this -> request_type == 'curl' && get_resource_type ( $ this -> request ) == 'curl' ) { curl_setopt ( $ this -> request , CURLOPT_POST , false ) ; curl_setopt ( $ this -> request , CURLOPT_URL , $ url ) ; curl_setopt ( $ this -> request , CURLOPT_RETURNTRANSFER , true ) ; $ response = curl_exec ( $ this -> request ) ; $ response = json_decode ( $ response ) ; } else { throw new Exception ( 'Unsupported request type' ) ; } return $ response ; }
Get assertions by email address

@param   mixed  $emailAddresses  String (for single user) or array (for multiple users) of user email addresses
@return  array
Get assertions by email address