https://developers.coinbase.com/api/v2#update-current-user
973259
def update_current_user(self, **params):
        """"""
        response = self._put('v2', 'user', data=params)
        return self._make_api_object(response, CurrentUser)
1097571
function doUpdateActivate(Userinfo $userinfo, Userinfo &$existinguser, $overwrite)
	{
		$changed = false;
		//check the activation status
		if (isset($existinguser->activation)) {
			if ($existinguser->activation != $userinfo->activation) {

				$update_activation = $this->params->get('update_activation', false);
				if ($update_activation || $overwrite) {
					if ($userinfo->activation) {
						//inactive the user
						try {
							$this->inactivateUser($userinfo, $existinguser);
							$changed = true;
						} catch (Exception $e) {
							$this->debugger->addError(Text::_('ACTIVATION_UPDATE_ERROR') . ' ' . $e->getMessage());
						}
					} else {
						//activate the user
						try {
							$this->activateUser($userinfo, $existinguser);
							$changed = true;
						} catch (Exception $e) {
							$this->debugger->addError(Text::_('ACTIVATION_UPDATE_ERROR') . ' ' . $e->getMessage());
						}
					}
				} else {
					//return a debug to inform we skipped this step
					$this->debugger->addDebug(Text::_('SKIPPED_ACTIVATION_UPDATE') . ': ' . $existinguser->activation . ' -> ' . $userinfo->activation);
				}
			}
		}
		return $changed;
	}
21022
def update(self, uid):
        '''
        
        '''
        if self.userinfo.role[1] >= '3':
            pass
        else:
            return False
        post_data = self.get_post_data()

        post_data['user_name'] = self.get_current_user()

        if self.is_p:
            if MLink.update(uid, post_data):
                output = {
                    'addinfo ': 1,
                }
            else:
                output = {
                    'addinfo ': 0,
                }
            return json.dump(output, self)
        else:
            if MLink.update(uid, post_data):
                self.redirect('/link/list')
845973
def users_update(self, user_id, **kwargs):
        """"""
        return self.__call_api_post('users.update', userId=user_id, data=kwargs)
643746
protected function canUpdate() {        
        $user_id = Filter::postInteger('userid', -1) ?: Filter::getInteger('userid', -1);
        return Auth::check() && 
            ( 
                $user_id == Auth::user()->getUserId() ||        // Allow update for yourself
                ($user_id == -1 && Auth::isManager(Globals::getTree()))   // Allow a manager to update the default user
             );
    }
1057241
def updateAccount(self, subject, person, vendorSpecific=None):
        
        response = self.updateAccountResponse(subject, person, vendorSpecific)
        return self._read_boolean_response(response)
346186
def can_update(self, user, **kwargs):
        """"""
        if user.is_admin():
            raise Return((True, set([])))

        is_creator = self.created_by == user.id
        if not (user.is_org_admin(self.organisation_id) or is_creator):
            raise Return((False, set([])))

        fields = ({'service_type', 'organisation_id'} & set(kwargs.keys()))
        if fields:
            raise Return((False, fields))
        else:
            raise Return((True, set([])))
115900
def modify(self, **params):
        """"""
        data = self.api_client.update_account(self.id, **params)
        self.update(data)
        return data
188887
def _build_session(self, auth_class, *args, **kwargs):
        
        session = requests.session()
        session.auth = auth_class(*args, **kwargs)
        session.headers.update({'CB-VERSION': self.API_VERSION,
                                'Accept': 'application/json',
                                'Content-Type': 'application/json',
                                'User-Agent': 'coinbase/python/2.0'})
        return session
1244100
def get_current_user(self):
        
        from google.appengine.api import users

        if _IS_DEVELOPMENT_SERVER:
            return users.get_current_user()
        else:
            from google.appengine.api import oauth

            try:
                user = oauth.get_current_user()
            except oauth.OAuthRequestError:
                user = users.get_current_user()
            return user
1266675
def _do_upgrade(self):
        
        self.current.output['cmd'] = 'upgrade'
        self.current.output['user_id'] = self.current.user_id
        self.terminate_existing_login()
        self.current.user.bind_private_channel(self.current.session.sess_id)
        user_sess = UserSessionID(self.current.user_id)
        user_sess.set(self.current.session.sess_id)
        self.current.user.is_online(True)
        # Clean up the locale from session to allow it to be re-read from the user preferences after login
        for k in translation.DEFAULT_PREFS.keys():
            self.current.session[k] = ''
396493
def put(self, user_name: str) -> User:
        
        current = current_user()
        if current.name == user_name or current.is_admin:
            user = self._get_or_abort(user_name)
            self.update(user)
            session.commit()
            session.add(user)
            return user
        else:
            abort(403)
1065977
def updateAccountValue(self, key, val, currency, accountName):
        """"""
        return _swigibpy.EWrapper_updateAccountValue(self, key, val, currency, accountName)
1042526
public void updateUser(String userDBID, User user) throws ProvisioningApiException {
		try {
			ApiSuccessResponse resp = usersApi.updateUser(userDBID, new UpdateUserData().data(Converters.convertUserToUpdateUserDataData(user)));

			if (!resp.getStatus().getCode().equals(0)) {
				throw new ProvisioningApiException("Error updating user. Code: " + resp.getStatus().getCode());
			}
        } catch(ApiException e) {
        	throw new ProvisioningApiException("Error updating user", e);
        }
	}
574190
def update_user_password(new_pwd_user_id, new_password,**kwargs):
    
    #check_perm(kwargs.get('user_id'), 'edit_user')
    try:
        user_i = db.DBSession.query(User).filter(User.id==new_pwd_user_id).one()
        user_i.password = bcrypt.hashpw(str(new_password).encode('utf-8'), bcrypt.gensalt())
        return user_i
    except NoResultFound:
        raise ResourceNotFoundError("User (id=%s) not found"%(new_pwd_user_id))
342813
def upgrade():
    """"""
    current_date = datetime.utcnow()

    # Add 'created' and 'updated' columns to RemoteAccount
    _add_created_updated_columns('oauthclient_remoteaccount', current_date)

    # Add 'created' and 'updated' columns to RemoteToken
    _add_created_updated_columns('oauthclient_remotetoken', current_date)

    # Add 'created' and 'updated' columns to UserIdentity
    _add_created_updated_columns('oauthclient_useridentity', current_date)
1141588
@RequestMapping(value = "{accountId}/update", method = RequestMethod.PUT)
    public Account updateAccount(@PathVariable ID accountId, @RequestBody @Valid AccountInput input) {
        return accountService.updateAccount(accountId, input);
    }