public function getPermissionsDescription()
    {
        if (class_exists(Subsite::class)) {
            Subsite::disable_subsite_filter(true);
        }

        $permissionsUsr = Permission::permissions_for_member($this->owner->ID);
        $permissionsSrc = Permission::get_codes(true);
        sort($permissionsUsr);

        $permissionNames = array();
        foreach ($permissionsUsr as $code) {
            $code = strtoupper($code);
            foreach ($permissionsSrc as $k => $v) {
                if (isset($v[$code])) {
                    $name = empty($v[$code]['name'])
                        ? _t(__CLASS__ . '.UNKNOWN', 'Unknown')
                        : $v[$code]['name'];
                    $permissionNames[] = $name;
                }
            }
        }

        $result = $permissionNames
            ? implode(', ', $permissionNames)
            : _t(__CLASS__ . '.NOPERMISSIONS', 'No Permissions');

        if (class_exists(Subsite::class)) {
            Subsite::disable_subsite_filter(false);
        }
        return $result;
    }
public function getPermissionsDescription()
    {
        if (class_exists(Subsite::class)) {
            Subsite::disable_subsite_filter(true);
        }

        $permissionsUsr = Permission::permissions_for_member($this->owner->ID);
        $permissionsSrc = Permission::get_codes(true);
        sort($permissionsUsr);

        $permissionNames = array();
        foreach ($permissionsUsr as $code) {
            $code = strtoupper($code);
            foreach ($permissionsSrc as $k => $v) {
                if (isset($v[$code])) {
                    $name = empty($v[$code]['name'])
                        ? _t(__CLASS__ . '.UNKNOWN', 'Unknown')
                        : $v[$code]['name'];
                    $permissionNames[] = $name;
                }
            }
        }

        $result = $permissionNames
            ? implode(', ', $permissionNames)
            : _t(__CLASS__ . '.NOPERMISSIONS', 'No Permissions');

        if (class_exists(Subsite::class)) {
            Subsite::disable_subsite_filter(false);
        }
        return $result;
    }
public function getPermissionsDescription ( ) { if ( class_exists ( Subsite :: class ) ) { Subsite :: disable_subsite_filter ( true ) ; } $ permissionsUsr = Permission :: permissions_for_member ( $ this -> owner -> ID ) ; $ permissionsSrc = Permission :: get_codes ( true ) ; sort ( $ permissionsUsr ) ; $ permissionNames = array ( ) ; foreach ( $ permissionsUsr as $ code ) { $ code = strtoupper ( $ code ) ; foreach ( $ permissionsSrc as $ k => $ v ) { if ( isset ( $ v [ $ code ] ) ) { $ name = empty ( $ v [ $ code ] [ 'name' ] ) ? _t ( __CLASS__ . '.UNKNOWN' , 'Unknown' ) : $ v [ $ code ] [ 'name' ] ; $ permissionNames [ ] = $ name ; } } } $ result = $ permissionNames ? implode ( ', ' , $ permissionNames ) : _t ( __CLASS__ . '.NOPERMISSIONS' , 'No Permissions' ) ; if ( class_exists ( Subsite :: class ) ) { Subsite :: disable_subsite_filter ( false ) ; } return $ result ; }
Builds a comma separated list of human-readbale permissions for a given Member.

@return string
Builds a comma separated list of human - readbale permissions for a given Member .