Saves new account settings.

@return bool
971807
public function save()
    {
        if ($this->validate()) {
            $this->user->scenario = 'settings';
            $this->user->username = $this->username;
            $this->user->password = $this->new_password;
            if ($this->email == $this->user->email && $this->user->unconfirmed_email != null) {
                $this->user->unconfirmed_email = null;
            } elseif ($this->email != $this->user->email) {
                switch ($this->module->emailChangeStrategy) {
                    case Module::STRATEGY_INSECURE:
                        $this->insecureEmailChange();
                        break;
                    case Module::STRATEGY_DEFAULT:
                        $this->defaultEmailChange();
                        break;
                    case Module::STRATEGY_SECURE:
                        $this->secureEmailChange();
                        break;
                    default:
                        throw new \OutOfBoundsException('Invalid email changing strategy');
                }
            }

            return $this->user->save();
        }

        return false;
    }
134420
public function save()
    {
        $saved = true;

        foreach ($this->_relationsToSave as $model) {
            $model->{$this->relPrimaryKey} = $this->owner->primaryKey;

            if (!$model->save()) {
                $this->owner->addErrors($model->getErrors());

                $saved = false;
            }
        }

        return $saved;
    }
1238560
public function save() {
		if (!isset($this->new_album)) {
			$this->new_album = 1;
		}

		if (!isset($this->last_notified)) {
			$this->last_notified = 0;
		}

		if (!parent::save()) {
			return false;
		}

		mkdir(tp_get_img_dir($this->guid), 0755, true);

		return true;
	}
1318173
protected function afterSave()
	{
	    if($this->hasEventHandler('onAfterSave'))
	        $this->onAfterSave(new CEvent($this));

	    // Store new config values in cache
	    foreach($this->attributes as $key=>$value)
	    	Yii::app()->cache->set('settings_'.$key, $value);

	    return true;
	}
1262793
public function save()
    {
        parent::save();

        $soxId = $this->getEditObjectId();

        if (!$this->_allowAdminEdit($soxId)) {
            return false;
        }

        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

        $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        if ($soxId != "-1") {
            $oUser->load($soxId);
        } else {
            $aParams['oxuser__oxid'] = null;
        }

        // checkbox handling
        $aParams['oxuser__oxactive'] = $oUser->oxuser__oxactive->value;

        $blNewsParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editnews");
        if (isset($blNewsParams)) {
            $oNewsSubscription = $oUser->getNewsSubscription();
            $oNewsSubscription->setOptInStatus((int) $blNewsParams);
            $oNewsSubscription->setOptInEmailStatus((int) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("emailfailed"));
        }

        $oUser->assign($aParams);
        $oUser->save();

        // set oxid if inserted
        $this->setEditObjectId($oUser->getId());
    }
616262
public function save()
	{
		// Validate
		if (!$this->validate())
		{
			return false;
		}

		// Handle cases where the primary key might be an empty string
		// For auto-increment in strict-mode DBs, this needs to be NULL
		// instead.
		if ($this->hasAttribute($this->getPrimaryKey())
		 && !$this->get($this->getPrimaryKey()))
		{
			$this->set($this->getPrimaryKey(), null);
		}

		// See if we're creating or updating
		$method = $this->isNew() ? 'create' : 'modify';
		$result = $this->$method();

		// Only perform the following upon success
		if ($result)
		{
			// Purge cache
			$this->purgeCache();

			// If creating, result is our new id, so set that back on the model
			if ($this->isNew())
			{
				$this->set($this->getPrimaryKey(), $result);
				\Event::trigger($this->getTableName() . '_new', ['model' => $this]);
			}

			\Event::trigger('system.onContentSave', array($this->getTableName(), $this));
		}

		return $result;
	}
215133
public function save()
    {
        if ($this->validate()) {
            $this->user->scenario = 'settings';
            $this->user->username = $this->username;
            $this->user->nickname = $this->nickname;
            $this->user->password = $this->new_password;
            if ($this->email == $this->user->email && $this->user->unconfirmed_email != null) {
                $this->user->unconfirmed_email = null;
            } elseif ($this->email != $this->user->email) {
                switch ($this->getSetting('emailChangeStrategy')) {
                    case Settings::STRATEGY_INSECURE:
                        $this->insecureEmailChange();
                        break;
                    case Settings::STRATEGY_DEFAULT:
                        $this->defaultEmailChange();
                        break;
                    case Settings::STRATEGY_SECURE:
                        $this->secureEmailChange();
                        break;
                    default:
                        throw new \OutOfBoundsException('Invalid email changing strategy');
                }
            }
            return $this->user->save();
        }
        return false;
    }
817545
public function save()
    {
        // Find record if we have an ID, otherwise create a new record
        $user = (Input::get('id')) ? User::with('addresses')->find(Input::get('id')) : new User;
        $result = $user->saveRecursive();

        // Capture errors to return via JSON model if we have some
        if ( ! $result) $user->errors = $user->getErrors();

        return $user;
    }
320342
public function save()
    {
        if (!$this->url)
        {
            $response = $this->upload();
            $this->url = $response['url'];
            $this->name = $response['name'];
        }

        return true;
    }
1023659
public function changePassword()
    {
        if ($this->validate() && $this->new_password == $this->new_password_confirm && $this->new_password) {
            $this->user->setPassword($this->new_password);
            return $this->user->save(false);
        } else {
            return false;
        }
    }
674275
public function saveSettings($settings)
    {
        if (isset($settings['name']) && isset($this->config['servers'][$settings['name']])) {
            return $this->saveConfig(array_merge($this->config['servers'][$settings['name']], $settings));
        }
    }
1011833
public function save()
    {
        $blSaved = parent::save();
        if ($blSaved && $this->oxcontents__oxloadid->value === 'oxagb') {
            $sShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
            $sVersion = $this->oxcontents__oxtermversion->value;

            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            // dropping expired..
            $oDb->execute("delete from oxacceptedterms where oxshopid='{$sShopId}' and oxtermversion != " . $oDb->quote($sVersion));
        }

        return $blSaved;
    }
535095
public function save()
    {
        if ($this->isDirty) {
            $this->backend->save($this->settingsValues);

            $this->isDirty = false;

            Backend\Cache::clearCache();
        }
    }
719958
public function save()
    {
        if ($this->isNew()) {
            return $this->adapter->create($this);
        } else {
            return $this->adapter->update($this);
        }
    }
648038
public function saveSettings()
    {
        // Get dependencies
        $settingMapper = ($this->container->dataMapper)('SettingMapper');
        $json = $this->container->json;

        // Fetch custom settings
        $jsonFilePath = ROOT_DIR . "structure/definitions/customSettings.json";
        $customSettings = $json->getJson($jsonFilePath, 'setting');
        $customSettings = $customSettings->settings;

        // Get $_POST data array
        $allSettings = $this->request->getParsedBody();

        // Save each setting
        foreach ($allSettings['setting_key'] as $key => $row) {
            $setting = $settingMapper->make();
            $setting->id = $allSettings['setting_id'][$key];

            // Check for a custom setting delete
            if (isset($allSettings['setting_delete'][$key])) {
                $settingMapper->delete($setting);
                continue;
            }

            $setting->setting_value = $allSettings['setting_value'][$key];

            // If there is no ID, then this is a new custom setting to save
            // Import setting information from custom file
            if (empty($allSettings['setting_id'][$key])) {
                // Get custom setting array key for this setting_key for reference
                $jsonKey = array_search($allSettings['setting_key'][$key], array_column($customSettings, 'key'));

                // Populate the new custom setting and save
                $setting->category = 'custom';
                $setting->sort_order = 1; // Custom setting display order is based on JSON list order
                $setting->setting_key = $customSettings[$jsonKey]->key;
                $setting->input_type = $customSettings[$jsonKey]->inputType;
                $setting->label = $customSettings[$jsonKey]->label;
                $setting->help = $customSettings[$jsonKey]->help;
            }

            $settingMapper->save($setting);
        }

        // Redirect back to list of settings
        return $this->redirect('adminSettings');
    }
568330
public function save(){

        foreach ($this->cols as $table => $prkey){

            foreach($prkey as $prkey_){

                if(strlen($prkey_)<3){continue;}

            $this->writedb($table, $prkey_);
            }
        //more table records
        $this->rows[$table]['index'] = $this->indexData[$table];

            try{
            $this->writedb($table, 'index');
            }
            catch(Exception $aa){
              return false;
            }

        }
    return true;
    }
40511
public function save()
	{
		if ( ! $this->is_loaded() ) return false;

		$this->fill_defaults();

		$error = null;

		$id = wp_insert_post( $this->attributes, $error );

		if ( ! empty( $id ) ) {

			$this->attributes['ID'] = $id;

			$this->save_meta_all();

		}

		return $error === false ? true : $error;
	}