Set a user mode.

@static

@param string $sMode - must be one of register, user, or guest
430074
public static function SetUserMode($sMode)
    {
        $aAllowedModes = array('register', 'user', 'guest');
        if (false == in_array($sMode, $aAllowedModes)) {
            trigger_error('invalid mode requested. please use one of '.implode(', ', $aAllowedModes), E_USER_ERROR);
        }
        $_SESSION['tw_order_umode'] = $sMode;
    }
591769
private function _setUserRegistration($oEmos, $oUser)
    {
        $iError = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('newslettererror');
        $iSuccess = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('success');

        if ($iError && $iError < 0) {
            $oEmos->addRegister($oUser ? $oUser->getId() : 'NULL', abs($iError));
        }

        if ($iSuccess && $iSuccess > 0 && $oUser) {
            $oEmos->addRegister($oUser->getId(), 0);
        }
    }
520734
private void setUserPasswordStatus(CmsUser user, boolean reset) {

        if (reset) {
            user.setAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET, "true");
        } else {
            user.deleteAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_PASSWORD_RESET);
        }
        CmsUserTable.USER_PASSWORD_STATUS.put(user.getId(), new Boolean(reset));
    }
648457
public function setMode($mode)
    {
        Validate::isString($mode, 'mode');
        Validate::isTrue(Mode::isValid($mode), Resources::INVALID_CHANGE_MODE_MSG);

        $this->_mode = $mode;
    }
495156
public function set($sType, $sMessage)
    {
        $sType    = strtoupper(trim($sType));
        $sMessage = trim($sMessage);

        $this->aMessages[$sType] = $sMessage;

        return $this;
    }
1056502
public SM2 setMode(SM2Mode mode) {
		this.mode = mode;
		if (null != this.engine) {
			this.engine.setMode(mode);
		}
		return this;
	}
806948
public static function GetUserMode()
    {
        $umode = 'register';
        if (array_key_exists('tw_order_umode', $_SESSION)) {
            $umode = $_SESSION['tw_order_umode'];
        }
        if ('user' != $umode) {
            // check if the user is signed in... if so, we change the mode to user
            $oUser = self::getExtranetUserProvider()->getActiveUser();
            if ($oUser && $oUser->IsLoggedIn()) {
                $umode = 'user';
                TShopStepUserDataV2::SetUserMode($umode);
            }
        }

        return $umode;
    }
904546
public function setPidMode(string $pidMode)
    {
        $this->pidMode = $pidMode;

        $this->hostConfig = array_merge($this->hostConfig, ['PidMode' => $pidMode]);

        return $this;
    }
1015741
public void setRespondsToMode(int iMoveMode, boolean flag)
    {
        if (iMoveMode == DBConstants.SCREEN_MOVE)
            m_bScreenMove = flag;
        if (iMoveMode == DBConstants.INIT_MOVE)
            m_bInitMove = flag;
        if (iMoveMode == DBConstants.READ_MOVE)
            m_bReadMove = flag;
    }
741090
protected function setUserFromSession()
    {
        $id = $this->session->get();

        if ($id) {
            $user = $this->repository->getById($this->session->get());
            if ($user instanceof UserInterface) {
                $this->admitUser($user);
                return;
            }
        }

        $this->currentUser = new GuestUser();
    }
1278572
public void setDefaultUserSettings(CmsDefaultUserSettings defaultUserSettings) {

        m_defaultUserSettings = defaultUserSettings;

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(
                Messages.get().getBundle().key(
                    Messages.INIT_DEFAULT_USER_SETTINGS_1,
                    m_defaultUserSettings.getClass().getName()));
        }
    }
387120
public void setUserManagementEnabled(String value) {

        m_showUserGroupIcon = Boolean.valueOf(value).booleanValue();
        if (CmsLog.INIT.isInfoEnabled()) {
            if (m_showUserGroupIcon) {
                CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_USER_MANAGEMENT_ICON_ENABLED_0));
            } else {
                CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_USER_MANAGEMENT_ICON_DISABLED_0));
            }
        }
    }
691093
public Ftp setMode(FtpMode mode) {
		this.mode = mode;
		switch (mode) {
		case Active:
			this.client.enterLocalActiveMode();
			break;
		case Passive:
			this.client.enterLocalPassiveMode();
			break;
		}
		return this;
	}
453181
def setInstallMode(self, remote, on=True, t=60, mode=1, address=None):
        """"""
        if self._server is not None:
            return self._server.setInstallMode(remote, on, t, mode, address)
468560
public static function setSqlMode(string $sqlMode): void
  {
    $sql = sprintf('set sql_mode = %s', self::$dl->quoteString($sqlMode));

    self::executeNone($sql);
  }
910312
protected function setUser()
    {
        $this->uid = $this->getParam('u', null);

        if (isset($this->uid)) {

            $this->current_user = $this->user->get($this->uid);

            if (empty($this->current_user['status'])) {
                $this->errorAndExit($this->text('No access'));
            }
        }
    }
346479
public static function setInstallMode($mode)
    {
        if (self::isCLIEnvironment()) {
            if ($mode === true) {
                self::$install_mode = true;
            } else {
                if (self::$install_mode &&
                    self::$nb_engine !== null &&
                    self::$nb_engine->main_database === null
                ) {
                    self::$nb_engine->registerMainDatabase();
                }
                self::$install_mode = false;
            }
        } else {
            throw new ENabuCoreException(ENabuCoreException::ERROR_INSTALL_MODE_LOCKED);
        }
    }