LLMS_REST_Users_Controller::update_object( array $prepared, WP_REST_Request $request )

Update the object in the database with prepared data

Parameters Parameters


(array) (Required) Prepared item data.


(WP_REST_Request) (Required) Request object.

Top ↑

Return Return

(obj) Object Instance of object from $this->get_object().

Top ↑

Source Source

File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-users-controller.php

	protected function update_object( $prepared, $request ) {

		$prepared['ID'] = $prepared['id'];

		$object_id = wp_update_user( $prepared );
		if ( is_wp_error( $object_id ) ) {
			return $object_id;

		unset( $prepared['ID'] );

		return $this->update_additional_data( $object_id, $prepared, $request );


Top ↑

Changelog Changelog

Version Description
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.