Checks if module is in disabled list.

@param string $sId Module id

@return bool
196296
protected function _isInDisabledList($sId)
    {
        return in_array($sId, (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aDisabledModules'));
    }
242370
public function logout($sid) {
		$retval = -1;
		$sql = "UPDATE ". self::tableName ." SET uid=NULL, session_data=NULL WHERE 
				session_id=:session_id::varchar(40)";
		
		$updateFields = array('session_id' => $sid);
		
		try {
			$retval = $this->db->run_update($sql, $updateFields);
		}
		catch(Exception $e) {
			$this->exception_handler($e->getMessage());
		}
		
		return($retval);
	}
1188568
protected function setModuleId($file)
    {
        $module_id = $this->getModuleIdFromZip($file);

        try {
            $this->module_model->checkModuleId($module_id);
        } catch (Exception $ex) {
            $this->error = $ex->getMessage();
            return false;
        }

        // Do not deal with enabled modules as it may cause fatal results
        // Check if the module ID actually has enabled status in the database
        // Alternative system methods are based on the scanned module folders so may return incorrect results
        if ($this->isEnabledModule($module_id)) {
            $this->error = $this->translation->text('Module @id is enabled and cannot be updated', array('@id' => $module_id));
            return false;
        }

        $this->module_id = $module_id;
        return true;
    }
364205
public function canUninstall($module_id)
    {
        if ($this->module->isActiveTheme($module_id)) {
            $error = $this->translation->text('Modules with "theme" type and active status cannot be disabled/uninstalled');
            throw new UnexpectedValueException($error);
        }

        if ($this->module->isLocked($module_id)) {
            throw new UnexpectedValueException($this->translation->text('Module is locked in code'));
        }

        return $this->checkDependentModules($module_id, $this->module->getList());
    }
1129997
public static function isDebugModeEnabled(Module $module)
    {
        return Craft::$app->getConfig()->getGeneral()->devMode ||
            ($module instanceof LoggableInterface && $module->isDebugModeEnabled());
    }
1180916
public function otherModules(bool $include_disabled = false): Collection
    {
        return $this->findByInterface(ModuleInterface::class, $include_disabled, true)
            ->filter(static function (ModuleInterface $module): bool {
                foreach (self::COMPONENTS as $interface) {
                    if ($module instanceof $interface) {
                        return false;
                    }
                }

                return true;
            });
    }
73199
protected function isEnabled()
    {
        // At least one redirect must be enabled
        if (!$this->getForceWWW() && !$this->getForceSSL()) {
            return false;
        }

        // Filter by env vars
        $enabledEnvs = $this->getEnabledEnvs();
        if (is_bool($enabledEnvs)) {
            return $enabledEnvs;
        }

        // If CLI, EnabledEnvs must contain CLI
        if (Director::is_cli() && !in_array('cli', $enabledEnvs)) {
            return false;
        }

        // Check other envs
        return empty($enabledEnvs) || in_array(Director::get_environment_type(), $enabledEnvs);
    }
594210
public function isRegistrationEnabled()
    {
        if (false === $xml = simplexml_load_string($this->get_prefs())) {
            return false;
        }

        $element = $xml->xpath('/baseprefs/caninscript');

        if (count($element) === 0) {
            return $this->databox->isRegistrationEnabled();
        }

        foreach ($element as $caninscript) {
            if (false !== (bool)(string)$caninscript) {
                return true;
            }
        }

        return false;
    }
168445
private function checkDeactivation($module)
    {
        $moduleValidator = new ModuleValidator($module->getAbsoluteBaseDir());

        $modules = $moduleValidator->getModulesDependOf();

        if (\count($modules) > 0) {
            $moduleList = implode(', ', array_column($modules, 'code'));

            $message = (\count($modules) == 1)
                ? Translator::getInstance()->trans(
                    '%s has dependency to module %s. You have to deactivate this module before.'
                )
                : Translator::getInstance()->trans(
                    '%s have dependencies to module %s. You have to deactivate these modules before.'
                );

            throw new ModuleException(
                sprintf($message, $moduleList, $moduleValidator->getModuleDefinition()->getCode())
            );
        }

        return true;
    }
1021581
public static function isTemporaryDisabled(?string $whichLevel = null): bool
    {
        if ($whichLevel === null) {
            return static::$temporaryDisabled !== false;
        } else {
            if (is_array(static::$temporaryDisabled)) {
                return in_array($whichLevel, static::$temporaryDisabled);
            } else {
                return false;
            }
        }
    }
1211619
public function isEnabled($modulePath)
    {
        $modulePathSegments = explode('/', $modulePath);
        $moduleConfiguration = Arrays::getValueByPath($this->modules, implode('.submodules.', $modulePathSegments));

        if (isset($moduleConfiguration['enabled']) && $moduleConfiguration['enabled'] !== true) {
            return false;
        }

        array_pop($modulePathSegments);

        if ($modulePathSegments === []) {
            return true;
        }

        return $this->isEnabled(implode('/', $modulePathSegments));
    }
739228
public function isActive()
    {
        $sid = defined('SID') ? constant('SID') : false;
        if ($sid !== false && session_id()) {
            return true;
        }

        if (headers_sent()) {
            return true;
        }

        return false;
    }
1032246
public function isDisabled()
    {
        // Obtain Current Page (with crumbs enabled):
        
        if (($page = $this->getCurrentPage(Page::class)) && !$page->CrumbsDisabled) {
            
            // Disable for Top-Level (if required):
            
            if ($this->HideTopLevel && $this->getCrumbsCount() == 1) {
                return true;
            }
            
            // Answer from Parent:
            
            return parent::isDisabled();
            
        }
        
        // Disable (by default):
        
        return true;
    }
571672
public function isEnabled(Request $request = null)
    {
        if (null === $this->path) {
            return true;
        }

        if (null === $request) {
            $request = $this->request;
        }

        // skip if route does not match
        if (0 === strpos($request->getPathInfo(), $this->path)) {
            return true;
        }

        return false;
    }
966783
public function isAllowed($module, $privilege): bool
    {
        if ($privilege) {
            $user = Auth::getIdentity();
            return $user && $user->hasPrivilege($module, $privilege);
        }
        return true;
    }
518946
function isEnabledIn($guild) {
        if($guild !== null) {
            $guild = $this->client->guilds->resolve($guild);
            return (!\array_key_exists($guild->id, $this->guildEnabled) || $this->guildEnabled[$guild->id]);
        }
        
        return $this->globalEnabled;
    }
1078874
protected function _ppLoadFullCategory($sId)
    {
        if (isset($this->_aArray[$sId])) {
            $oNewCat = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
            if ($oNewCat->load($sId)) {
                // replace aArray object with fully loaded category
                $this->_aArray[$sId] = $oNewCat;
            }
        } else {
            $this->_sActCat = null;
        }
    }