Update only the user attributes provided.
    Return a list of BridgeUsers objects with custom fields.
176268
def update_user(bridge_user):
    
    if bridge_user.bridge_id:
        url = author_id_url(bridge_user.bridge_id)
    else:
        url = author_uid_url(bridge_user.netid)
    resp = patch_resource(url + ("?%s" % CUSTOM_FIELD),
                          json.dumps(bridge_user.to_json_patch(),
                                     separators=(',', ':')))
    return _process_json_resp_data(resp)
187686
public function updateUserSettings(FilterUserFieldsEvent $userfields_filter)
    {
        $settings_manager = $userfields_filter->getContainer()->get('acs.setting_manager');

        $user = $userfields_filter->getContainer()->get('security.context')->getToken()->getUser();

        $fields_template = $userfields_filter->getUserFields();

        //if($settings_manager->isUpdateAvailable($user, 'user_schema_version', $fields_template['user_schema_version']['default_value'])){
            // We have an update in the user fields
            $settings_manager->loadSettingDefaults($fields_template, $user);
        //}
    }
961345
def update_user(resource_root, user):
  
  return call(resource_root.put,
      '%s/%s' % (USERS_PATH, user.name), ApiUser, data=user)
206437
public static function update_users_parameters() {
        $userfields = [
            'id' => new external_value(core_user::get_property_type('id'), 'ID of the user'),
            // General.
            'username' => new external_value(core_user::get_property_type('username'),
                'Username policy is defined in Moodle security config.', VALUE_OPTIONAL, '', NULL_NOT_ALLOWED),
            'auth' => new external_value(core_user::get_property_type('auth'), 'Auth plugins include manual, ldap, etc',
                VALUE_OPTIONAL, '', NULL_NOT_ALLOWED),
            'suspended' => new external_value(core_user::get_property_type('suspended'),
                'Suspend user account, either false to enable user login or true to disable it', VALUE_OPTIONAL),
            'password' => new external_value(core_user::get_property_type('password'),
                'Plain text password consisting of any characters', VALUE_OPTIONAL, '', NULL_NOT_ALLOWED),
            'firstname' => new external_value(core_user::get_property_type('firstname'), 'The first name(s) of the user',
                VALUE_OPTIONAL, '', NULL_NOT_ALLOWED),
            'lastname' => new external_value(core_user::get_property_type('lastname'), 'The family name of the user',
                VALUE_OPTIONAL),
            'email' => new external_value(core_user::get_property_type('email'), 'A valid and unique email address', VALUE_OPTIONAL,
                '', NULL_NOT_ALLOWED),
            'maildisplay' => new external_value(core_user::get_property_type('maildisplay'), 'Email display', VALUE_OPTIONAL),
            'city' => new external_value(core_user::get_property_type('city'), 'Home city of the user', VALUE_OPTIONAL),
            'country' => new external_value(core_user::get_property_type('country'),
                'Home country code of the user, such as AU or CZ', VALUE_OPTIONAL),
            'timezone' => new external_value(core_user::get_property_type('timezone'),
                'Timezone code such as Australia/Perth, or 99 for default', VALUE_OPTIONAL),
            'description' => new external_value(core_user::get_property_type('description'), 'User profile description, no HTML',
                VALUE_OPTIONAL),
            // User picture.
            'userpicture' => new external_value(PARAM_INT,
                'The itemid where the new user picture has been uploaded to, 0 to delete', VALUE_OPTIONAL),
            // Additional names.
            'firstnamephonetic' => new external_value(core_user::get_property_type('firstnamephonetic'),
                'The first name(s) phonetically of the user', VALUE_OPTIONAL),
            'lastnamephonetic' => new external_value(core_user::get_property_type('lastnamephonetic'),
                'The family name phonetically of the user', VALUE_OPTIONAL),
            'middlename' => new external_value(core_user::get_property_type('middlename'), 'The middle name of the user',
                VALUE_OPTIONAL),
            'alternatename' => new external_value(core_user::get_property_type('alternatename'), 'The alternate name of the user',
                VALUE_OPTIONAL),
            // Interests.
            'interests' => new external_value(PARAM_TEXT, 'User interests (separated by commas)', VALUE_OPTIONAL),
            // Optional.
            'url' => new external_value(core_user::get_property_type('url'), 'User web page', VALUE_OPTIONAL),
            'icq' => new external_value(core_user::get_property_type('icq'), 'ICQ number', VALUE_OPTIONAL),
            'skype' => new external_value(core_user::get_property_type('skype'), 'Skype ID', VALUE_OPTIONAL),
            'aim' => new external_value(core_user::get_property_type('aim'), 'AIM ID', VALUE_OPTIONAL),
            'yahoo' => new external_value(core_user::get_property_type('yahoo'), 'Yahoo ID', VALUE_OPTIONAL),
            'msn' => new external_value(core_user::get_property_type('msn'), 'MSN ID', VALUE_OPTIONAL),
            'idnumber' => new external_value(core_user::get_property_type('idnumber'),
                'An arbitrary ID code number perhaps from the institution', VALUE_OPTIONAL),
            'institution' => new external_value(core_user::get_property_type('institution'), 'Institution', VALUE_OPTIONAL),
            'department' => new external_value(core_user::get_property_type('department'), 'Department', VALUE_OPTIONAL),
            'phone1' => new external_value(core_user::get_property_type('phone1'), 'Phone', VALUE_OPTIONAL),
            'phone2' => new external_value(core_user::get_property_type('phone2'), 'Mobile phone', VALUE_OPTIONAL),
            'address' => new external_value(core_user::get_property_type('address'), 'Postal address', VALUE_OPTIONAL),
            // Other user preferences stored in the user table.
            'lang' => new external_value(core_user::get_property_type('lang'), 'Language code such as "en", must exist on server',
                VALUE_OPTIONAL, '', NULL_NOT_ALLOWED),
            'calendartype' => new external_value(core_user::get_property_type('calendartype'),
                'Calendar type such as "gregorian", must exist on server', VALUE_OPTIONAL, '', NULL_NOT_ALLOWED),
            'theme' => new external_value(core_user::get_property_type('theme'),
                'Theme name such as "standard", must exist on server', VALUE_OPTIONAL),
            'mailformat' => new external_value(core_user::get_property_type('mailformat'),
                'Mail format code is 0 for plain text, 1 for HTML etc', VALUE_OPTIONAL),
            // Custom user profile fields.
            'customfields' => new external_multiple_structure(
                new external_single_structure(
                    [
                        'type'  => new external_value(PARAM_ALPHANUMEXT, 'The name of the custom field'),
                        'value' => new external_value(PARAM_RAW, 'The value of the custom field')
                    ]
                ), 'User custom fields (also known as user profil fields)', VALUE_OPTIONAL),
            // User preferences.
            'preferences' => new external_multiple_structure(
                new external_single_structure(
                    [
                        'type'  => new external_value(PARAM_RAW, 'The name of the preference'),
                        'value' => new external_value(PARAM_RAW, 'The value of the preference')
                    ]
                ), 'User preferences', VALUE_OPTIONAL),
        ];
        return new external_function_parameters(
            [
                'users' => new external_multiple_structure(
                    new external_single_structure($userfields)
                )
            ]
        );
    }
973259
def update_current_user(self, **params):
        """"""
        response = self._put('v2', 'user', data=params)
        return self._make_api_object(response, CurrentUser)
726068
public void updateUser(User user){
        ProtocolHeader header = new ProtocolHeader();
        header.setType(ProtocolType.UpdateUser);

        UpdateUserProtocol p = new UpdateUserProtocol(user);

        connection.submitRequest(header, p, null);
    }
367407
def _wrap_users(users, request):
    
    result = set()
    for u in users:
        if u is SELF and is_authenticated(request):
            result.add(request.user.get_username())
        else:
            result.add(u)
    return result
114374
def update_user(email, profile="splunk", **kwargs):
    '''
    
    '''

    client = _get_splunk(profile)

    email = email.lower()

    user = list_users(profile).get(email)

    if not user:
        log.error('Failed to retrieve user %s', email)
        return False

    property_map = {}

    for field in ALLOWED_FIELDS_FOR_MODIFICATION:
        if kwargs.get(field):
            property_map[field] = kwargs.get(field)

    # update
    kwargs = {}
    roles = [role.name for role in user.role_entities]

    for k, v in property_map.items():
        resource_value = user[k]
        if resource_value is not None:
            # you can't update the username in update api call
            if k.lower() == 'name':
                continue
            if k.lower() == 'roles':
                if isinstance(v, six.string_types):
                    v = v.split(',')
                if set(roles) != set(v):
                    kwargs['roles'] = list(set(v))
            elif resource_value != v:
                kwargs[k] = v

    if kwargs:
        user.update(**kwargs).refresh()

        fields_modified = {}
        for field in ALLOWED_FIELDS_FOR_MODIFICATION:
            fields_modified[field] = user[field]

    else:
        #succeeded, no change
        return True
1368576
def update(self, password=values.unset):
        
        data = values.of({'Password': password, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return CredentialInstance(
            self._version,
            payload,
            account_sid=self._solution['account_sid'],
            credential_list_sid=self._solution['credential_list_sid'],
            sid=self._solution['sid'],
        )
388910
def update_fields(fields)
      attributes[:name]      = fields['name'] || attributes[:name]
      attributes[:id]        = fields['id'] || attributes[:id]
      attributes[:pos]       = fields['pos'] || attributes[:pos]
      attributes[:url]       = fields['url'] || attributes[:url]
      attributes[:bytes]     = fields['bytes'].to_i || attributes[:bytes]
      attributes[:member_id] = fields['idMember'] || attributes[:member_id]
      attributes[:date]      = Time.parse(fields['date']).presence || attributes[:date]
      attributes[:is_upload] = fields['isUpload'] if fields.has_key?('isUpload')
      attributes[:mime_type] = fields['mimeType'] || attributes[:mime_type]
      attributes[:previews]  = fields['previews'] if fields.has_key?('previews')
      self
    end
216726
def change_uid(bridge_id, new_uwnetid, no_custom_fields=True):
    
    url = author_id_url(bridge_id)
    if not no_custom_fields:
        url += ("?%s" % CUSTOM_FIELD)
    resp = patch_resource(url, '{"user":{"uid":"%s@uw.edu"}}' % new_uwnetid)
    return _process_json_resp_data(resp,
                                   no_custom_fields=no_custom_fields)
1275803
public void updateProfile(ProfileFieldValues values) {
		getResourceFactory().getApiResource("/user/profile/")
				.entity(values, MediaType.APPLICATION_JSON_TYPE).put();
	}
716230
def configure_user(self, user, attributes, attribute_mapping):
        
        user.set_unusable_password()
        return self.update_user(user, attributes, attribute_mapping,
                                force_save=True)
630599
def update_fields(fields)
      attributes[:id]        = fields['id'] || attributes[:id]
      attributes[:idPlugin]  = fields['idPlugin'] || attributes[:idPlugin]
      attributes[:scope]     = fields['scope'] || attributes[:scope]
      attributes[:value]     = JSON.parse(fields['value']).presence if fields.has_key?('value')
      attributes[:idModel]   = fields['idModel'] || attributes[:idModel]
      attributes[:access]    = fields['access'] || attributes[:access]
      self
    end
1100854
private void updatePropertiesData(Property bridge) {
        Property selectedItem = getSelectedEntity();
        if (bridge != null) { selectedItem = bridge; }
        if (selectedItem != null) {
            ModelNode sourceContextNode = selectedItem.getValue().get("source-context");
            ModelNode targetContextNode = selectedItem.getValue().get("target-context");
            sourceContextEditor.update(sourceContextNode.asPropertyList());
            targetContextEditor.update(targetContextNode.asPropertyList());
            formAssets.getForm().edit(selectedItem.getValue());
            sourceCredentialRefForm.getForm().edit(selectedItem.getValue().get("source-credential-reference"));
            targetCredentialRefForm.getForm().edit(selectedItem.getValue().get("target-credential-reference"));
        } else {
            formAssets.getForm().clearValues();
            sourceContextEditor.clearValues();
            targetContextEditor.clearValues();
            sourceCredentialRefForm.getForm().clearValues();
            targetCredentialRefForm.getForm().clearValues();
        }
        sourceContextEditor.enableToolButtons(selectedItem != null);
        targetContextEditor.enableToolButtons(selectedItem != null);
    }
817306
def get_attributes(user, service):
    
    attributes = {}
    for path in get_callbacks(service):
        callback = import_string(path)
        attributes.update(callback(user, service))
    return attributes
628353
def update(self, auth_payload=values.unset):
        
        return self._proxy.update(auth_payload=auth_payload, )