src/Authentication/Handlers/HandlerLDAP.php
public function getAttributeFromResults($results, $attr_name) {
        foreach($results as $node) {
        	if($attr_name == "dn") {
        		return $node->getDn();
        	}

            foreach($node->getAttributes() as $attribute) {
                if (strtolower($attribute->getName()) == strtolower($attr_name)) {
                    return $attribute->getValues()[0]; // attribute found
                }
            }
        }
        return null;
    }
public function getAttributeFromResults($results, $attr_name) {
        foreach($results as $node) {
        	if($attr_name == "dn") {
        		return $node->getDn();
        	}

            foreach($node->getAttributes() as $attribute) {
                if (strtolower($attribute->getName()) == strtolower($attr_name)) {
                    return $attribute->getValues()[0]; // attribute found
                }
            }
        }
        return null;
    }
public function getAttributeFromResults ( $ results , $ attr_name ) { foreach ( $ results as $ node ) { if ( $ attr_name == "dn" ) { return $ node -> getDn ( ) ; } foreach ( $ node -> getAttributes ( ) as $ attribute ) { if ( strtolower ( $ attribute -> getName ( ) ) == strtolower ( $ attr_name ) ) { return $ attribute -> getValues ( ) [ 0 ] ; // attribute found } } } return null ; }
Returns the value of the specified attribute from the result set. Returns
null if the attribute could not be found.

@param Result-instance $results The result-set to search through
@param string $attr_name The attribute name to look for
@return string|integer|boolean|null
Returns the value of the specified attribute from the result set . Returns null if the attribute could not be found .