Inpsyde\MultilingualPress\Common\Setting\User\SecureUserSettingUpdater::update PHP Method

update() public method

Updates the setting with the data in the request for the user with the given ID.
Since: 3.0.0
public update ( integer $user_id ) : boolean
$user_id integer User ID.
return boolean Whether or not the user setting was updated successfully.
    public function update($user_id)
    {
        if (!current_user_can('edit_user', $user_id)) {
            return false;
        }
        if ($this->nonce && !$this->nonce->is_valid()) {
            return false;
        }
        $value = $this->get_value();
        return $value ? update_user_meta($user_id, $this->meta_key, $value) : delete_user_meta($user_id, $this->meta_key);
    }
SecureUserSettingUpdater