Updates the extended user form instance.

@return void
434051
public function updateForm()
    {
        if ($userDefinedForm = $this->owner->getController()->data()) {
            
            if ($userDefinedForm->EnableSpamGuard) {
                $this->owner->enableSpamProtection();
            }
            
        }
    }
460251
public function actionUpdate()
	{
		$post=$this->loadPost();
		if(Yii::app()->request->isPostRequest)
		{
			if(isset($_POST['Post']))
				$post->setAttributes($_POST['Post']);
			if($post->save())
				$this->redirect(array('show','id'=>$post->id));
		}
		$this->render('update',array('post'=>$post));
	}
886111
function update() {
    var $this = this,
      self = User.resourceConstructor().call(this, this.id);

    return self.update.apply(self, arguments).then(function (updated) {
      Utils.extend($this, updated, true);
      return updated;
    });
  }
412956
public function actionUpdate() {
		
		try {
			\App::$domain->rbac->role->update();
		} catch(NotAuthenticatedException $e) {
			\App::$domain->account->auth->breakSession();
			echo 'NotAuthenticatedException';
			return;
		} catch(UnauthorizedHttpException $e) {
			\App::$domain->account->auth->breakSession();
			echo 'UnauthorizedHttpException';
			return;
		}
		echo 'success';
	}
25600
public function update()
    {
        $version = get_option($this->plugin . 'version');
        if ($version != STATICWP_VERSION) {
            update_option($this->plugin . 'version', STATICWP_VERSION);
        }
    }
920251
public function update()
    {
        $args = func_get_args();
        $user = null;

        if (count($args) == 1 && $args[0] instanceof User) {
            $user = $args[0];
        } elseif (count($args) == 2 && !empty($args[0]) && is_array($args[1])) {
            $user = $this->find($args[0]);
            $user->fill($args[1]);
        }

        if ($user instanceof User) {
            if ($this->fireEvent('updating', array($user)) === false) {
                return false;
            }

            $user->setCaller($this);
            $user->save();

            $this->fireEvent('updated', array($user));

            return $user;
        }

        throw new Exception(sprintf(Exception::CANT_UPDATE_MODEL,
            'Subbly\\Model\\User',
            $this->name()
        ));
    }
579667
protected function execUpdateForm()
    {
        // form translations
        $this->loadTranslations('form', sprintf('private/global/locales/%s/form.ini', LANGUAGE));
        // get record
        $this->templateParameters['record'] = $this->getByPrimaryKey($this->primaryKeyValue);
        // render template
        $this->renderTemplate(sprintf('%s/%s/save-form', AREA, $this->name));
    }
845256
private function update()
    {
        $errors = array();
        switch( State::get('action') )
        {
            case 'save':
                $errors = $this->save();
                Notifier::success('Settings saved.');
                break;
            case 'reset-section':
                $section = $this->config->get_section_by_slug(State::get('active_section'));
                $this->reset( $section );
                Notifier::success('<strong>'.$section->title.'</strong> section was reset to its default settings.');
                break;
            case 'reset-all':
                $this->reset();
                Notifier::success('All sections were reset to their default settings.');
                break;
            // No submission (simple request)
            default:
                $this->load();
        }
        
        $this->set_errors($errors);
    }
102394
private function update()
    {
        $Eresus = Eresus_CMS::getLegacyKernel();

        $item = $Eresus->db->selectItem($this->table['name'], "`id`='" . arg('update') . "'");
        $old_file = $item['image'];
        $item['caption'] = arg('caption', 'dbsafe');
        $item['active'] = arg('active', 'int');
        if (arg('section'))
        {
            $item['section'] = '|' . implode('|', arg('section')) . '|';
        }
        $item['block'] = arg('block', 'dbsafe');
        $item['priority'] = arg('priority', 'int');
        $item['showFrom'] = arg('showFrom', 'dbsafe');
        $item['showTill'] = arg('showTill', 'dbsafe');
        $item['showCount'] = arg('showCount', 'int');
        $item['html'] = arg('html', 'dbsafe');
        $item['image'] = arg('image');
        $item['width'] = arg('width', 'int');
        $item['height'] = arg('height', 'int');
        $item['url'] = arg('url', 'dbsafe');
        $item['target'] = arg('target', 'dbsafe');

        if ($item['showTill'] == '')
        {
            unset($item['showTill']);
        }
        if (arg('flushShowCount'))
        {
            $item['shows'] = 0;
        }
        if (is_uploaded_file($_FILES['image']['tmp_name']))
        {
            $path = $Eresus->fdata . $this->name . '/';
            if (is_file($path . $old_file))
            {
                unlink($path . $old_file);
            }
            $filename = 'banner' . $item['id'] .
                substr($_FILES['image']['name'], strrpos($_FILES['image']['name'], '.'));
            upload('image', $path . $filename);
            $item['image'] = $filename;
        }

        $Eresus->db->updateItem($this->table['name'], $item, "`id`='" . $item['id'] . "'");

        if ($item['showTill'] == '')
        {
            $Eresus->db->query(
                "UPDATE " . $Eresus->db->prefix . $this->table['name'] .
                " SET `showTill` = NULL WHERE `id`='" . $item['id'] . "'");
        }

        HTTP::redirect(arg('submitURL'));
    }
46631
public function editUser($user_id = null)
    {
        $this->setUser($user_id);
        $this->setTitleEditUser();
        $this->setBreadcrumbEditUser();
        $this->controlAccessEditUser($user_id);

        $this->setData('user', $this->data_user);
        $this->setData('roles', $this->role->getList());
        $this->setData('can_delete', $this->canDeleteUser());
        $this->setData('is_superadmin', $this->isSuperadminUser());
        $this->setData('password_limit', $this->user->getPasswordLength());

        $this->submitEditUser();
        $this->outputEditUser();
    }
703612
private function update()
    {
        Eresus_Kernel::log(__METHOD__, LOG_DEBUG, '()');

        $settings = "<?php\n";

        $settings .= $this->mkstr('siteName', 'string');
        $settings .= $this->mkstr('siteTitle', 'string');
        $settings .= $this->mkstr('siteTitleReverse', 'bool');
        $settings .= $this->mkstr('siteTitleDivider', 'string');
        $settings .= $this->mkstr('siteKeywords', 'string', array('nobr'=>true));
        $settings .= $this->mkstr('siteDescription', 'string', array('nobr'=>true));
        $settings .= $this->mkstr('mailFromAddr', 'string');
        $settings .= $this->mkstr('mailFromName', 'string');
        $settings .= $this->mkstr('mailFromOrg', 'string');
        $settings .= $this->mkstr('mailReplyTo', 'string');
        $settings .= $this->mkstr('mailFromSign', 'string', array('savebr'=>true));
        $settings .= $this->mkstr('filesModeSetOnUpload', 'bool');
        $settings .= $this->mkstr('filesModeDefault', 'string');
        $settings .= $this->mkstr('filesTranslitNames', 'bool');
        $settings .= $this->mkstr('contentTypeDefault', 'string');
        $settings .= $this->mkstr('pageTemplateDefault', 'string');

        $legacyKernel = Eresus_Kernel::app()->getLegacyKernel();
        file_put_contents($legacyKernel->froot . 'cfg/settings.php', $settings);
        HTTP::goback();
    }
258419
protected function refreshApplication()
    {
        if (!$this->foundation->installed()) {
            return;
        }

        $this->call('extension:detect', ['--quiet' => true]);

        $extensions = $this->memory->get('extensions.active', []);

        try {
            foreach ($extensions as $extension => $config) {
                $options = ['name' => $extension, '--force' => true];

                $this->call('extension:refresh', $options);
                $this->call('extension:update', $options);
            }

            $this->foundation->make('antares.extension.provider')->writeFreshManifest();
        } catch (PDOException $e) {
            // Skip if application is unable to make connection to the database.
        }
    }
958808
public function initUpdate()
    {
        $this->addAction(['icon' => 'edit'], new jsModal('Edit', $this->pageUpdate, [$this->name => $this->jsRow()->data('id'), $this->name.'_sort' => $this->getSortBy()]));

        $this->pageUpdate->set(function () {
            $this->model->load($this->app->stickyGet($this->name));

            // Maybe developer has already created form
            if (!is_object($this->formUpdate) || !$this->formUpdate->_initialized) {
                $this->formUpdate = $this->pageUpdate->add($this->formUpdate ?: $this->formDefault);
            }

            $this->formUpdate->setModel($this->model, $this->fieldsUpdate ?: $this->fieldsDefault);

            if ($sortBy = $this->getSortBy()) {
                $this->formUpdate->stickyGet($this->name.'_sort', $sortBy);
            }

            // set save handler with reload trigger
            // adds default submit hook if it is not already set for this form
            if (!$this->formUpdate->hookHasCallbacks('submit')) {
                $this->formUpdate->onSubmit(function ($form) {
                    $form->model->save();

                    return $this->jsSaveUpdate();
                });
            }
        });
    }
1366003
def update
      if @user.update_attributes(permitted_params.user.merge({:password_required => false}))
        redirect_to edit_user_url(@user), :notice => t(:your_changes_were_saved)
      else
        render :action => 'edit'
      end
    end
1181406
public function updateAction(User $user)
    {
        $this->userService->updateUser($user);
        $this->addFlashMessage('Your user has been updated.', 'User updated', Message::SEVERITY_OK);
        $this->redirect('edit');
    }
1196945
public function update()
    {
        $sync = !empty($this->request->query['sync']) ? true : false;
        if (AcoManager::buildAcos(null, $sync)) {
            $this->Flash->success(__d('user', 'Permissions tree was successfully updated!'));
        } else {
            $this->Flash->danger(__d('user', 'Some errors occur while updating permissions tree.'));
        }

        $this->title(__d('user', 'Update Permissions'));
        $this->redirect($this->referer());
    }
918077
public function edit()
    {
        $this->defaultData();
        $userService = $this->getServiceLocator()->get(tao_models_classes_UserService::class);
        $user = $this->getUserResource();

        $types = $user->getTypes();
        $myFormContainer = new tao_actions_form_Users(reset($types), $user);
        $myForm = $myFormContainer->getForm();

        if ($myForm->isSubmited()) {
            if ($myForm->isValid()) {
                $values = $myForm->getValues();
                if (!empty($values['password2']) && !empty($values['password3'])) {
                    $plainPassword =  $values['password2'];
                    $values[GenerisRdf::PROPERTY_USER_PASSWORD] = core_kernel_users_Service::getPasswordHash()->encrypt($values['password2']);
                }

                unset($values['password2']);
                unset($values['password3']);

                if (!preg_match("/[A-Z]{2,4}$/", trim($values[GenerisRdf::PROPERTY_USER_UILG]))) {
                    unset($values[GenerisRdf::PROPERTY_USER_UILG]);
                }
                if (!preg_match("/[A-Z]{2,4}$/", trim($values[GenerisRdf::PROPERTY_USER_DEFLG]))) {
                    unset($values[GenerisRdf::PROPERTY_USER_DEFLG]);
                }

                $userService->checkCurrentUserAccess($values[GenerisRdf::PROPERTY_USER_ROLES]);

                // leave roles which are not in the allowed list for current user
                $oldRoles = $userService->getUserRoles($user);
                $allowedRoles = $userService->getPermittedRoles($userService->getCurrentUser(), $oldRoles, false);
                $staticRoles = array_diff($oldRoles, $allowedRoles);
                $values[GenerisRdf::PROPERTY_USER_ROLES] = array_merge($values[GenerisRdf::PROPERTY_USER_ROLES], $staticRoles);

                $binder = new tao_models_classes_dataBinding_GenerisFormDataBinder($user);

                if ($binder->bind($values)) {
                    $data = [];
                    if (isset($plainPassword)){
                        $data = ['hashForKey' => UserHashForEncryption::hash($plainPassword)];
                    }
                    $this->getEventManager()->trigger(new UserUpdatedEvent(
                        $user,
                        array_merge($values, $data))
                    );
                    $this->setData('message', __('User saved'));
                }
            }
        }

        $this->setData('formTitle', __('Edit a user'));
        $this->setData('myForm', $myForm->render());
        $this->setView('user/form.tpl');
    }