Saves the canged user data.<p>
512020
protected void save() {

        boolean newUser = false;
        try {
            if (m_user == null) {
                createNewUser();
                newUser = true;
            } else {

                saveUser();
            }
            saveUserSettings();
            if (m_sendEmail.getValue().booleanValue() & m_sendEmail.isEnabled()) {
                sendMail(m_cms, m_pw.getPassword1(), m_user, newUser, m_forceResetPassword.getValue().booleanValue());
            }
        } catch (CmsException e) {
            LOG.error("Unable to save user", e);
        }
    }
924929
boolean saveOptions() {

        //Enable history?
        boolean enabled = ((ComboBoxVersionsBean)m_numberVersions.getValue()).getValue() != CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED;

        //Maximal count of versions for current resources.
        int versions = ((ComboBoxVersionsBean)m_numberVersions.getValue()).getValue();

        //Maximal count of versions for deleted resources.
        int versionsDeleted = versions;

        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_DISABLED)) {
            versionsDeleted = 0;
        }
        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_WITHOUTVERSIONS)) {
            versionsDeleted = 1;
        }

        if (m_mode.getValue().equals(CmsFileHistoryApp.MODE_WITHVERSIONS)
            && (versions == CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED)) {
            return false;
        }
        OpenCms.getSystemInfo().setVersionHistorySettings(enabled, versions, versionsDeleted);
        OpenCms.writeConfiguration(CmsSystemConfiguration.class);

        return true;
    }
225361
public void saveUser(User user) {
        LOG.trace("Trying to create a new user");
        // encode the raw password using bcrypt
        final String pwHash = passwordEncoder.encode(user.getPassword());
        user.setPassword(pwHash);
        dao.saveOrUpdate(user);
        LOG.info("Created the user " + user.getAccountName());
    }
1297058
function savePersistentData()
    {
        $this->HTTP->setSessionVariable( $this->StorageName . $this->MetaDataName, $this->MetaData );
        $this->HTTP->setSessionVariable( $this->StorageName . $this->VariableListName, $this->VariableList );
    }
819150
@Override
    protected void writeUserInfo(CmsSetupDb dbCon, String id, String key, Object value) {

        Connection conn = dbCon.getConnection();

        try {
            PreparedStatement p = conn.prepareStatement(readQuery(QUERY_INSERT_CMS_USERDATA));
            p.setString(1, id);
            p.setString(2, key);
            p.setBytes(3, CmsDataTypeUtil.dataSerialize(value));
            p.setString(4, value.getClass().getName());
            p.executeUpdate();
            conn.commit();

        } catch (SQLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
375285
private void addUserLastModifiedColumn() {

        addColumn(CmsHistoryMessages.columnUserLastModified(), 120, new TextColumn<CmsHistoryResourceBean>() {

            @Override
            public String getValue(CmsHistoryResourceBean historyRes) {

                return historyRes.getUserLastModified();
            }
        });
    }
542549
private void save() {

        if ((m_focalPoint != null) && isEditable()) {
            int x = (int)m_focalPoint.getX();
            int y = (int)m_focalPoint.getY();
            String val = "" + x + "," + y;
            CmsUUID sid = m_imageInfoProvider.get().getStructureId();
            List<CmsPropertyModification> propChanges = new ArrayList<>();
            propChanges.add(new CmsPropertyModification(sid, CmsGwtConstants.PROPERTY_IMAGE_FOCALPOINT, val, false));
            final CmsPropertyChangeSet changeSet = new CmsPropertyChangeSet(sid, propChanges);
            CmsRpcAction<Void> action = new CmsRpcAction<Void>() {

                @Override
                public void execute() {

                    CmsCoreProvider.getVfsService().saveProperties(changeSet, this);

                }

                @SuppressWarnings("synthetic-access")
                @Override
                protected void onResponse(Void result) {

                    m_savedFocalPoint = m_focalPoint;

                    if (m_pointWidget != null) {
                        m_pointWidget.setIsDefault(false);
                    }
                    m_imageInfoProvider.get().setFocalPoint(m_focalPoint);
                    if (m_nextAction != null) {
                        m_nextAction.run();
                    }

                }
            };
            action.execute();

        }
    }
1084071
@Override
    public void actionCommit() {

        List<Throwable> errors = new ArrayList<Throwable>();

        if (getUsers().isEmpty()) {
            setCommitErrors(
                Collections.singletonList((Throwable)new CmsIllegalStateException(
                    Messages.get().container(Messages.ERR_NO_SELECTED_USER_WITH_EMAIL_0))));
            return;
        }
        try {
            Iterator<CmsUser> itUsers = getUsers().iterator();
            while (itUsers.hasNext()) {
                CmsUser user = itUsers.next();
                OpenCms.getSessionManager().sendBroadcast(
                    getCms().getRequestContext().getCurrentUser(),
                    m_msgInfo.getMsg(),
                    user);
            }
        } catch (Throwable t) {
            errors.add(t);
        }
        // set the list of errors to display when saving failed
        setCommitErrors(errors);
    }
640875
public void submit(CmsUser user, CmsObject cms, Runnable afterWrite, boolean force) {

        try {
            if (isValid() | force) {
                if (force) {
                    removeValidators();
                }
                m_binder.commit();
                PropertyUtilsBean propUtils = new PropertyUtilsBean();
                for (CmsAccountInfo info : OpenCms.getWorkplaceManager().getAccountInfos()) {
                    boolean editable = (m_editLevel == EditLevel.all)
                        || ((m_editLevel == EditLevel.configured) && info.isEditable());
                    if (editable) {
                        if (info.isAdditionalInfo()) {
                            user.setAdditionalInfo(info.getAddInfoKey(), m_infos.getItemProperty(info).getValue());
                        } else {
                            if (!CmsStringUtil.isEmptyOrWhitespaceOnly(
                                (String)m_infos.getItemProperty(info).getValue())) {
                                propUtils.setProperty(
                                    user,
                                    info.getField().name(),
                                    m_infos.getItemProperty(info).getValue());
                            }
                        }
                    }
                }
                cms.writeUser(user);
                afterWrite.run();
            }
        } catch (CmsException | CommitException | IllegalAccessException | InvocationTargetException
        | NoSuchMethodException e) {
            LOG.error("Unable to commit changes to user..", e);
        }
    }
1308941
public function persistData()
    {
        // we sort the array first, useful for doing ris match
        if (!empty($this->userAgentsWithDeviceID)) {
            ksort($this->userAgentsWithDeviceID);
            $this->persistenceProvider->save($this->getPrefix(), $this->userAgentsWithDeviceID);
        }
    }
845644
void persist(final String key, final String value, final boolean enableDisableMode, final boolean disable, final File file) throws IOException, StartException {
        persist(key, value, enableDisableMode, disable, file, null);
    }
1307560
static synchronized void saveToCache(UnixUserGroupInformation ugi) {
    ugiCache.put(ugi.getUserName(), new CachedUgi(ugi, System
        .currentTimeMillis()));
  }
337897
protected void submit() {

        if (m_userinfoNoEditGroup.getRows().size() != m_addInfoReadOnly.size()) {
            List<String> currentKeys = getKeyListFromGroup(m_userinfoNoEditGroup);
            for (String key : m_addInfoReadOnly.keySet()) {
                if (!currentKeys.contains(key)) {
                    saveAddInfo(key, null);
                }
            }
        }

        for (I_CmsEditableGroupRow row : m_userinfoGroup.getRows()) {
            String key = ((TextField)(((HorizontalLayout)row.getComponent()).getComponent(0))).getValue();
            String value = ((TextField)(((HorizontalLayout)row.getComponent()).getComponent(1))).getValue();
            saveAddInfo(key, value);
            m_addInfoEditable.remove(key);
        }

        //Remaining items in list seem to be deleted by the user..
        for (String key : m_addInfoEditable.keySet()) {
            saveAddInfo(key, null);
        }
        try {
            m_cms.writeUser(m_user);
        } catch (CmsException e) {
            LOG.error("Unable to write user.", e);
        }
    }
1042102
protected void setUserData(CmsUser user, CmsListItem item) {

        item.set(LIST_COLUMN_LOGIN, user.getName());
        item.set(LIST_COLUMN_NAME, user.getFullName());
        item.set(LIST_COLUMN_EMAIL, user.getEmail());
        item.set(LIST_COLUMN_LASTLOGIN, new Date(user.getLastlogin()));
    }
839653
public void save() {

        CmsRpcAction<CmsAliasEditValidationReply> action = new CmsRpcAction<CmsAliasEditValidationReply>() {

            @Override
            public void execute() {

                start(200, false);

                CmsAliasSaveValidationRequest saveRequest = new CmsAliasSaveValidationRequest();
                saveRequest.setSiteRoot(m_siteRoot);
                List<CmsAliasTableRow> rows = m_view.getLiveData();
                saveRequest.setEditedData(rows);
                saveRequest.setRewriteData(m_view.getRewriteData());
                saveRequest.getDeletedIds().addAll(m_deletedIds);
                saveRequest.setOriginalData(m_initialData);
                getService().saveAliases(saveRequest, this);
            }

            @Override
            public void onResponse(CmsAliasEditValidationReply result) {

                stop(false);
                if (result == null) {
                    m_view.close();
                } else if (result.hasErrors()) {
                    m_view.update(result.getChangedRows());
                }
            }
        };
        action.execute();
    }
982509
public void actionSave() {

        HttpServletRequest request = getJsp().getRequest();
        // save initialized instance of this class in request attribute for included sub-elements
        request.setAttribute(SESSION_WORKPLACE_CLASS, this);

        // special case: set the preferred editor settings in the user settings object
        CmsUserSettings userSettings = new CmsUserSettings(getSettings().getUser());
        // first set the old preferred editors
        m_userSettings.setEditorSettings(userSettings.getEditorSettings());
        // also set the old start gallery settings
        m_userSettings.setStartGalleriesSetting(userSettings.getStartGalleriesSettings());
        // then set the old synchronization settings
        m_userSettings.setSynchronizeSettings(userSettings.getSynchronizeSettings());
        Enumeration<String> en = request.getParameterNames();
        while (en.hasMoreElements()) {
            // search all request parameters for the presence of the preferred editor parameters
            String paramName = en.nextElement();
            if (paramName.startsWith(PARAM_PREFERREDEDITOR_PREFIX)) {
                String paramValue = request.getParameter(paramName);
                if ((paramValue != null) && !INPUT_DEFAULT.equals(paramValue.trim())) {
                    // set selected editor for this resource type
                    m_userSettings.setPreferredEditor(
                        paramName.substring(PARAM_PREFERREDEDITOR_PREFIX.length()),
                        CmsEncoder.decode(paramValue));
                } else {
                    // reset preferred editor for this resource type
                    m_userSettings.setPreferredEditor(paramName.substring(PARAM_PREFERREDEDITOR_PREFIX.length()), null);
                }
            } else if (paramName.startsWith(PARAM_STARTGALLERY_PREFIX)) {
                String paramValue = request.getParameter(paramName);
                if (paramValue != null) {
                    // set the selected start gallery for the gallery type
                    m_userSettings.setStartGallery(
                        paramName.substring(PARAM_STARTGALLERY_PREFIX.length()),
                        CmsEncoder.decode(paramValue));
                }
            }
        }

        // set the current user in the settings object
        m_userSettings.setUser(getSettings().getUser());
        m_userSettings.setAdditionalPreferencesFrom(userSettings);

        try {
            // write the user settings to the db
            m_userSettings.save(getCms());
        } catch (CmsException e) {
            // should usually never happen
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
        }

        // update the preferences and project after saving
        updatePreferences(getCms(), getJsp().getRequest());

        try {
            String projectName = m_userSettings.getStartProject();
            CmsProject project = getCms().readProject(projectName);
            getCms().getRequestContext().setCurrentProject(project);
            getSettings().setProject(project.getUuid());
        } catch (Exception e) {
            // should usually never happen
            LOG.error(e.getLocalizedMessage());
        }

        // now determine if the dialog has to be closed or not
        try {
            if (DIALOG_SET.equals(getParamAction())) {
                // after "set" action, leave dialog open
                Map<String, String[]> params = new HashMap<String, String[]>();
                params.put(PARAM_TAB, new String[] {String.valueOf(getActiveTab())});
                params.put(PARAM_SETPRESSED, new String[] {Boolean.TRUE.toString()});
                sendForward(getJsp().getRequestContext().getUri(), params);
            } else {
                // forward to dialog with action set to reload the workplace
                Map<String, String[]> params = new HashMap<String, String[]>();
                params.put(PARAM_ACTION, new String[] {DIALOG_RELOAD});
                sendForward(getJsp().getRequestContext().getUri(), params);
            }
        } catch (IOException e) {
            // error during forward, do nothing
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
        } catch (ServletException e) {
            // error during forward, do nothing
            if (LOG.isInfoEnabled()) {
                LOG.info(e.getLocalizedMessage());
            }
        }
    }
240257
public function saveUsers()
    {
        // Get dependencies
        $userMapper = ($this->container->dataMapper)('UserMapper');
        $users = $this->request->getParsedBodyParam('email');

        // Save users
        foreach ($users as $user) {
            if (!empty($user)) {
                $User = $userMapper->make();
                $User->email = strtolower(trim($user));
                $userMapper->save($User);
            }
        }

        // Redirect back to list of users
        return $this->redirect('adminUsers');
    }