src/LdapClient.php
public function read($dn)
	{
		if (!$this->isBound || !$this->isConnected())
		{
			return false;
		}

		$base   = substr($dn, strpos($dn, ',') + 1);
		$cn     = substr($dn, 0, strpos($dn, ','));
		$result = ldap_read($this->resource, $base, $cn);

		if ($result === false)
		{
			return false;
		}

		return ldap_get_entries($this->resource, $result);
	}
public function read($dn)
	{
		if (!$this->isBound || !$this->isConnected())
		{
			return false;
		}

		$base   = substr($dn, strpos($dn, ',') + 1);
		$cn     = substr($dn, 0, strpos($dn, ','));
		$result = ldap_read($this->resource, $base, $cn);

		if ($result === false)
		{
			return false;
		}

		return ldap_get_entries($this->resource, $result);
	}
public function read ( $ dn ) { if ( ! $ this -> isBound || ! $ this -> isConnected ( ) ) { return false ; } $ base = substr ( $ dn , strpos ( $ dn , ',' ) + 1 ) ; $ cn = substr ( $ dn , 0 , strpos ( $ dn , ',' ) ) ; $ result = ldap_read ( $ this -> resource , $ base , $ cn ) ; if ( $ result === false ) { return false ; } return ldap_get_entries ( $ this -> resource , $ result ) ; }
Read attributes of a given DN

@param   string  $dn  The DN of the object you want to read

@return  array|boolean  Array of attributes for the given DN or boolean false on failure

@since   1.0
Read attributes of a given DN