Update profile.
@return mixed
172485
public function actionProfile()
    {
        $user = $this->findModel(Yii::$app->user->id);
        if (empty($user)) {
            return $this->goBack();
        }
        $configProfileForm = [
            'user' => $user,
        ];
        $model = $this->module->model('ProfileForm', [$configProfileForm]);

        $post = Yii::$app->request->post();
        $loaded = $model->load($post);
        if ($loaded) {
            $saved = $model->save($isNewRecord = false);
            if ($saved !== false) {
                $msg = ($saved === 0) ? Yii::t($this->tcModule, 'Profile not change.')
                                      : Yii::t($this->tcModule, 'Profile modified.');
                Yii::$app->session->setFlash('success', $msg);
                return $this->goHome();
            }
        }
        return $this->render('profile-form', [
            'model' => $model,
        ]);
    }
1180926
public function edit($id = null)
    {
        $profile = $this->Profiles->get($id, [
            'contain' => []
        ]);
        if ($this->request->is(['patch', 'post', 'put'])) {
            $profile = $this->Profiles->patchEntity($profile, $this->request->data);
            if ($this->Profiles->save($profile)) {
                $this->Flash->success(__('The profile has been saved.'));

                return $this->redirect(['action' => 'index']);
            }
            $this->Flash->error(__('The profile could not be saved. Please, try again.'));
        }
        $users = $this->Profiles->Users->find('list', ['limit' => 200]);
        $this->set(compact('profile', 'users'));
        $this->set('_serialize', ['profile']);
    }
956450
public function update()
	{
		// temporary disable relations
		$tmp_relations   = $this->relations;
		$this->relations = array();

		// Build query and execute update
		$query = \DB::update(call_user_func($this->model.'::table'));
		$tmp   = $this->build_query($query, array(), 'update');
		$query = $tmp['query'];
		$res = $query->set($this->values)->execute($this->write_connection);

		// put back any relations settings
		$this->relations = $tmp_relations;

		// Update can affect 0 rows when input types are different but outcome stays the same
		return $res >= 0;
	}
724554
public function update($item)
    {
        $item['profile'] = encodeOptions($item['profile']);
        $result = Eresus_CMS::getLegacyKernel()->db->
            updateItem($this->table, $item, "`id`={$item['id']}");
        return $result;
    }
727185
public function updateUser(UpdateProfileUserRequest $request)
    {
        $input = [];

        if ($this->auth->user()->can('user::change-own-name')) {
            $input = array_merge($input, [
                'first_name' => $request->first_name,
                'last_name'  => $request->last_name,
            ]);
        }

        if ($this->auth->user()->can('user::change-own-email')) {
            $input = array_merge($input, [
                'email' => $request->email,
            ]);
        }

        $this->user->update($input, $this->auth->id());

        flash(trans('core::messages.resource.resource updated', ['name' => trans('user::profile.title.profile')]));

        return redirect()->back();
    }
1232171
public function update()
    {
        $firstUp = !Schema::hasTable($this->getMigrationTableName());
        if ($firstUp) {
            $this->repository->createRepository();
            $this->note('Migration table created');
        }

        /*
         * Update modules
         */
        $modules = Config::get('cms.loadModules', []);
        foreach ($modules as $module) {
            $this->migrateModule($module);
        }

        /*
         * Update plugins
         */
        $plugins = $this->pluginManager->sortByDependencies();
        foreach ($plugins as $plugin) {
            $this->updatePlugin($plugin);
        }

        Parameter::set('system::update.count', 0);
        CacheHelper::clear();

        /*
         * Seed modules
         */
        if ($firstUp) {
            $modules = Config::get('cms.loadModules', []);
            foreach ($modules as $module) {
                $this->seedModule($module);
            }
        }

        return $this;
    }
1000151
def update_profile!
      assert!
      callback = Callback.new
      @profile = nil
      @connection.communicate('get_self') do |success, data|
        if success
          callback.trigger(:success)
          contact = TelegramContact.pick_or_new(self, data)
          @contacts << contact unless self.contacts.include?(contact)
          @profile = contact
        else
          raise "Couldn't fetch the user profile."
        end
      end
      callback
    end
241813
def update_profile(self, attrs, attr_map=None):
        
        user_attrs = dict_to_cognito(attrs,attr_map)
        self.client.update_user_attributes(
            UserAttributes=user_attrs,
            AccessToken=self.access_token
        )
512040
public function update()
	{
		// Get group config
		$groupsConfig = \Component::params('com_groups');

		// Path to group folder
		$directory  = PATH_APP . DS . trim($groupsConfig->get('uploadpath', '/site/groups'), DS);
		$directory .= DS . $this->group->get('gidNumber');

		// Get task, defaults to update
		$task = ($this->arguments->getOpt(3)) ? $this->arguments->getOpt(3) : 'update';

		// Set our group directory & call update
		$this->arguments->setOpt('r', $directory);
		\App::get('client')->call('repository', $task, $this->arguments, $this->output);
	}
1314678
public function update()
	{
		if (!is_numeric($this->get('uidNumber')))
		{
			return false;
		}

		$db =  \App::get('db');

		$modifiedDate = gmdate('Y-m-d H:i:s');

		$this->set('modifiedDate', $modifiedDate);

		$query = "UPDATE `#__xprofiles` SET ";

		$classvars = get_class_vars(__CLASS__);

		$first = true;
		$affected = 0;

		foreach ($classvars as $property => $value)
		{
			if ('_' == substr($property, 0, 1))
			{
				continue;
			}

			if (!$first)
			{
				$query .= ',';
			}
			else
			{
				$first = false;
			}

			if ($property == 'params')
			{
				if (is_object($this->_params))
				{
					$query .= "params='".str_replace("", "", $this->_params->toString())."'";
				}
				else
				{
					$query .= "params=''";
				}
				continue;
			}

			if ($this->get($property) === null)
			{
				$query .= "$property=NULL";
			}
			else
			{
				$query .= "$property=" . $db->quote($this->get($property));
			}
		}

		$query .= " WHERE uidNumber=" . $db->quote($this->get('uidNumber')) . ";";

		$db->setQuery($query);

		if (!$db->query())
		{
			$this->setError('Error updating data in xprofiles table: ' . $db->getErrorMsg());
		}

		$affected = $db->getAffectedRows();

		foreach ($classvars as $property => $value)
		{
			if (('_auxv_' != substr($property, 0, 6)) && ('_auxs_' != substr($property, 0, 6)))
			{
				continue;
			}

			$property = substr($property, 6);

			$first = true;

			$query = "REPLACE INTO #__xprofiles_" . $property . " (uidNumber, " . $property . ") VALUES ";
			$query_values = "";

			$list = $this->get($property);

			if (!is_array($list))
			{
				$list = array($list);
			}

			foreach ($list as $value)
			{
				if (!$first)
				{
					$query_values .= ',';
				}

				$first = false;

				$query_values .= '(' . $db->quote($this->get('uidNumber')) . ',' . $db->quote($value) . ')';
			}

			if ($query_values != '')
			{
				$db->setQuery($query . $query_values);

				if (!$db->query())
				{
					$this->setError("Error updating data in xprofiles $property table: " . $db->getErrorMsg());
				}
				else
				{
					$affected += $db->getAffectedRows();
				}
			}

			if (property_exists(__CLASS__, '_auxv_' . $property))
			{
				foreach ($list as $key => $value)
				{
					$list[$key] = $db->quote($value);
				}

				$valuelist = implode($list, ",");

				if (empty($valuelist))
				{
					$valuelist = "''";
				}

				$query = "DELETE FROM #__xprofiles_" . $property . " WHERE uidNumber=" . $this->get('uidNumber') . " AND $property NOT IN ($valuelist);";

				$db->setQuery($query);

				if (!$db->query())
				{
					$this->setError("Error deleting data in xprofiles $property table: " . $db->getErrorMsg());
				}
				else
				{
					$affected += $db->getAffectedRows();
				}
			}
		}

		if ($affected > 0)
		{
			Event::trigger('user.onAfterStoreProfile', array($this));
		}

		return true;
	}
362723
public function updateProfileStatus($profileId, $status, $options = array())
  {
      $options = array_merge(array('note' => ''), $options);
      $this->post['PROFILEID'] = $profileId;
      $this->post['ACTION'] = $status;
      $this->post['NOTE'] = $options['note'];
      $response = $this->commit('ManageRecurringPaymentsProfileStatus');

      return $response;
  }
107425
public function updatePassword(UpdateProfilePasswordRequest $request)
    {
        $user = $this->user->find($this->auth->id());

        $credentials = [
            'id'       => $this->auth->id(),
            'email'    => $user->email,
            'password' => $request->old_password,
        ];

        if (! $this->auth->attempt($credentials)) {
            Flash::error(trans('user::messages.invalid old password'));

            return redirect()->back();
        }

        $this->user->update($request->all(), $this->auth->id());

        flash(trans('user::messages.password updated'));

        return redirect()->back();
    }
752530
public function update()
    {
        // Do the initial check
        $fromTables = $this->getInstalledTables();
        $toTables = $this->getSchemaTables();
        $protectedTableNames = $this->app['schema.content_tables']->keys();

        $this->getSchemaComparator()->compare($fromTables, $toTables, $protectedTableNames, true);
        $response = $this->getSchemaComparator()->getResponse();
        $creates = $this->getSchemaComparator()->getCreates();
        $alters = $this->getSchemaComparator()->getAlters();

        $modifier = new TableModifier($this->connection, $this->app['logger.system'], $this->app['logger.flash']);
        $modifier->createTables($creates, $response);
        $modifier->alterTables($alters, $response);

        $event = new SchemaEvent($creates, $alters);
        $this->app['dispatcher']->dispatch(SchemaEvents::UPDATE, $event);

        // Recheck now that we've processed
        $fromTables = $this->getInstalledTables();
        $toTables = $this->getSchemaTables();
        $this->getSchemaComparator()->compare($fromTables, $toTables, $protectedTableNames);
        if (!$this->getSchemaComparator()->hasPending($fromTables, $toTables, $protectedTableNames)) {
            $this->getSchemaTimer()->setCheckExpiry();
        }

        return $response;
    }
767097
public function update()
    {
        if (!Input::has('settings')) {
            return $this->jsonErrorResponse('"settings" is required.');
        }

        $settings = Subbly::api('subbly.setting');

        $user = $settings->updateMany(Input::get('settings'));

        return $this->jsonResponse(array(
                'settings' => $settings->all(),
            ),
            array(
                'status' => array(
                    'code'    => 200,
                    'message' => 'Settings updated',
                ),
        ));
    }
554824
public function update()
    {
        $result = $this->connection()->patch($this->getEndpoint() . '/' . urlencode($this->id), $this->jsonWithNamespace());
        if ($result === 200) {
            return true;
        }

        return $this->selfFromResponse($result);
    }
653140
protected function update()
    {
        $this->preUpdate();
        $this->data = $this->api->update($this->id, $this->data);
        $this->postUpdate();

        return $this;
    }
691800
public function actionProfile()
    {
        if (($model = UserProfile::findOne(['user_id' => Yii::$app->user->identity->getId()])) !== null) {
            if (!Yii::$app->request->isGet) {
                $model->load(Yii::$app->getRequest()->getBodyParams(), '');
                if ($model->save() === false && !$model->hasErrors()) {
                    throw new ServerErrorHttpException('Failed to update the object for unknown reason.');
                }
            }
            return $model;
        } else {
            throw new NotFoundHttpException ('User not found.');
        }
    }