public function refreshAllowedOrganizations()
    {
        // Privilege overrules organizational settings
        if ($this->hasPrivilege('pr.organization-switch')) {
            $orgs = $this->util->getDbLookup()->getOrganizations();
        } else {
            $org = $this->getBaseOrganization();

            $orgs = array($org->getId() => $org->getName()) +
                    $org->getAllowedOrganizations();
        }
        // \MUtil_Echo::track($orgs);

        $this->_setVar('__allowedOrgs', $orgs);

        // Clean this cache
        $this->_unsetVar('__allowedRespOrgs');

        return $this;
    }
public function refreshAllowedOrganizations()
    {
        // Privilege overrules organizational settings
        if ($this->hasPrivilege('pr.organization-switch')) {
            $orgs = $this->util->getDbLookup()->getOrganizations();
        } else {
            $org = $this->getBaseOrganization();

            $orgs = array($org->getId() => $org->getName()) +
                    $org->getAllowedOrganizations();
        }
        // \MUtil_Echo::track($orgs);

        $this->_setVar('__allowedOrgs', $orgs);

        // Clean this cache
        $this->_unsetVar('__allowedRespOrgs');

        return $this;
    }
public function refreshAllowedOrganizations ( ) { // Privilege overrules organizational settings if ( $ this -> hasPrivilege ( 'pr.organization-switch' ) ) { $ orgs = $ this -> util -> getDbLookup ( ) -> getOrganizations ( ) ; } else { $ org = $ this -> getBaseOrganization ( ) ; $ orgs = array ( $ org -> getId ( ) => $ org -> getName ( ) ) + $ org -> getAllowedOrganizations ( ) ; } // \MUtil_Echo::track($orgs); $ this -> _setVar ( '__allowedOrgs' , $ orgs ) ; // Clean this cache $ this -> _unsetVar ( '__allowedRespOrgs' ) ; return $ this ; }
Allowes a refresh of the existing list of organizations
for this user.

@return \Gems_User_User (continuation pattern)
Allowes a refresh of the existing list of organizations for this user .