LLMS_REST_Users_Controller::update_item( WP_REST_Request $request )
Update item
Parameters Parameters
- $request
-
(WP_REST_Request) (Required) Request object.
Return Return
(WP_REST_Response|WP_Error) Response object or WP_Error
on failure.
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-users-controller.php
} /** * Update item * * @since 1.0.0-beta.1 * * @param WP_REST_Request $request Request object. * @return WP_REST_Response|WP_Error Response object or `WP_Error` on failure. */ public function update_item( $request ) { $object = $this->get_object( $request['id'] ); if ( is_wp_error( $object ) ) { return $object; } // Ensure we're not trying to update the email to an email that already exists. $owner_id = email_exists( $request['email'] ); if ( $owner_id && $owner_id !== $request['id'] ) {
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |