kernel/classes/ezrole.php
static function accessArrayByUserID( $idArray, $recursive = false )
    {
        $roles = eZRole::fetchByUser( $idArray, $recursive );
        $userLimitation = false;

        $accessArray = array();
        foreach ( array_keys ( $roles )  as $roleKey )
        {
            $accessArray = array_merge_recursive( $accessArray, $roles[$roleKey]->accessArray() );
            if ( $roles[$roleKey]->attribute( 'limit_identifier' ) )
            {
                $userLimitation = true;
            }
        }

        if ( $userLimitation )
        {
            foreach( $accessArray as $moduleKey => $functionList )
            {
                foreach( $functionList as $functionKey => $policyList )
                {
                    foreach( $policyList as $policyKey => $limitationList )
                    {
                        if ( is_array( $limitationList ) )
                        {
                            foreach( $limitationList as $limitationKey => $limitKeyArray )
                            {
                                if ( is_array( $limitKeyArray ) )
                                {
                                    $accessArray[$moduleKey][$functionKey][$policyKey][$limitationKey] = array_unique( $limitKeyArray );
                                }
                            }
                        }
                    }
                }
            }
        }
        return $accessArray;
    }
static function accessArrayByUserID( $idArray, $recursive = false )
    {
        $roles = eZRole::fetchByUser( $idArray, $recursive );
        $userLimitation = false;

        $accessArray = array();
        foreach ( array_keys ( $roles )  as $roleKey )
        {
            $accessArray = array_merge_recursive( $accessArray, $roles[$roleKey]->accessArray() );
            if ( $roles[$roleKey]->attribute( 'limit_identifier' ) )
            {
                $userLimitation = true;
            }
        }

        if ( $userLimitation )
        {
            foreach( $accessArray as $moduleKey => $functionList )
            {
                foreach( $functionList as $functionKey => $policyList )
                {
                    foreach( $policyList as $policyKey => $limitationList )
                    {
                        if ( is_array( $limitationList ) )
                        {
                            foreach( $limitationList as $limitationKey => $limitKeyArray )
                            {
                                if ( is_array( $limitKeyArray ) )
                                {
                                    $accessArray[$moduleKey][$functionKey][$policyKey][$limitationKey] = array_unique( $limitKeyArray );
                                }
                            }
                        }
                    }
                }
            }
        }
        return $accessArray;
    }
static function accessArrayByUserID ( $ idArray , $ recursive = false ) { $ roles = eZRole :: fetchByUser ( $ idArray , $ recursive ) ; $ userLimitation = false ; $ accessArray = array ( ) ; foreach ( array_keys ( $ roles ) as $ roleKey ) { $ accessArray = array_merge_recursive ( $ accessArray , $ roles [ $ roleKey ] -> accessArray ( ) ) ; if ( $ roles [ $ roleKey ] -> attribute ( 'limit_identifier' ) ) { $ userLimitation = true ; } } if ( $ userLimitation ) { foreach ( $ accessArray as $ moduleKey => $ functionList ) { foreach ( $ functionList as $ functionKey => $ policyList ) { foreach ( $ policyList as $ policyKey => $ limitationList ) { if ( is_array ( $ limitationList ) ) { foreach ( $ limitationList as $ limitationKey => $ limitKeyArray ) { if ( is_array ( $ limitKeyArray ) ) { $ accessArray [ $ moduleKey ] [ $ functionKey ] [ $ policyKey ] [ $ limitationKey ] = array_unique ( $ limitKeyArray ) ; } } } } } } } return $ accessArray ; }
Return access array by passing in list of groups user belongs to and his user id

@param array $idArray Array of eZContentObject IDs, either groups + user id or user id's only
If only user id's, then remember to set $recursive to true
@param bool $recursive See {@link eZRole::fetchByUser()}
@return array Hash with complete access limitation description
Return access array by passing in list of groups user belongs to and his user id