Skip to content
This repository has been archived by the owner on Jul 11, 2018. It is now read-only.

AM Removal of not specified attributes

Remold edited this page Jul 31, 2015 · 1 revision
if (isset($attributes) and ($attributes !== FALSE)) {
 
    $requiredAttributes = array(
            'urn:mace:dir:attribute-def:uid',
            'urn:mace:dir:attribute-def:eduPersonPrincipalName',
            'urn:mace:terena.org:attribute-def:schacHomeOrganization',
            'urn:mace:terena.org:attribute-def:schacPersonalUniqueCode'
            );
 
    foreach($attributes as $k => $v) {
        if(!in_array($k, $requiredAttributes)) {
            unset($attributes[$k]);
        }
    }
}