Contents
bp_rest_get_user( int $user_id )
Get the user object, if the ID is valid.
Description
Parameters
- $user_id
-
(int) (Required) Supplied user ID.
Return
(WP_User|boolean)
Source
File: bp-core/bp-core-rest-api.php
function bp_rest_get_user( $user_id ) { if ( (int) $user_id <= 0 ) { return false; } $user = get_userdata( (int) $user_id ); if ( empty( $user ) || ! $user->exists() ) { return false; } return $user; }
Changelog
Version | Description |
---|---|
BuddyBoss 1.3.5 | Introduced. |
Related
Used By | Description |
---|---|
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::create_multiple_item() |
Invite multiple member to a group. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::create_multiple_item_permissions_check() |
Checks if a given request has access to invite a multiple member to a group. |
bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php: BP_REST_XProfile_Data_Endpoint::get_item_permissions_check() |
Check if a given request has access to get users’s data. |
bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php: BP_REST_XProfile_Data_Endpoint::update_item() |
Save XProfile data. |
bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php: BP_REST_XProfile_Data_Endpoint::update_item_permissions_check() |
Check if a given request has access to save XProfile field data. |
bp-xprofile/classes/class-bp-rest-xprofile-data-endpoint.php: BP_REST_XProfile_Data_Endpoint::delete_item() |
Delete user’s xProfile data. |
bp-messages/classes/class-bp-rest-messages-endpoint.php: BP_REST_Messages_Endpoint::get_items_permissions_check() |
Check if a given request has access to thread items. |
bp-members/classes/class-bp-rest-members-details-endpoint.php: BP_REST_Members_Details_Endpoint::get_item() |
Retrieve member detail. |
bp-members/classes/class-bp-rest-members-endpoint.php: BP_REST_Members_Endpoint::get_item_permissions_check() |
Checks if a given request has access to read a user. |
bp-members/classes/class-bp-rest-members-endpoint.php: BP_REST_Members_Endpoint::update_item_permissions_check() |
Check if a given request has access to update a member. |
bp-members/classes/class-bp-rest-members-endpoint.php: BP_REST_Members_Endpoint::delete_item() |
Deletes a single user. |
bp-members/classes/class-bp-rest-attachments-member-avatar-endpoint.php: BP_REST_Attachments_Member_Avatar_Endpoint::get_item_permissions_check() |
Checks if a given request has access to get a member avatar. |
bp-members/classes/class-bp-rest-attachments-member-cover-endpoint.php: BP_REST_Attachments_Member_Cover_Endpoint::get_item_permissions_check() |
Checks if a given request has access to get a user cover. |
bp-members/classes/class-bp-rest-members-actions-endpoint.php: BP_REST_Members_Actions_Endpoint::update_item_permissions_check() |
Check if a given request has access to update a member. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::create_item_permissions_check() |
Checks if a given request has access to make a group membership request. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::delete_item() |
Reject a pending group membership request. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::create_item() |
Add member to a group. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::create_item_permissions_check() |
Checks if a given request has access to join a group. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::update_item() |
Update user status on a group (add, remove, promote, demote or ban). |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::update_item_permissions_check() |
Check if a given request has access to update a group member. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::delete_item() |
Delete a group membership. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::delete_item_permissions_check() |
Check if a given request has access to delete a group member. |
bp-groups/classes/class-bp-rest-group-membership-endpoint.php: BP_REST_Group_Membership_Endpoint::prepare_item_for_response() |
Prepares group member data for return as an object. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::get_items_permissions_check() |
Check if a given request has access to fetch group membership requests. |
bp-groups/classes/class-bp-rest-group-membership-request-endpoint.php: BP_REST_Group_Membership_Request_Endpoint::create_item() |
Request membership to a group. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::get_items_permissions_check() |
Check if a given request has access to group invitations. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::create_item() |
Invite a member to a group. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::create_item_permissions_check() |
Checks if a given request has access to invite a member to a group. |
bp-groups/classes/class-bp-rest-group-invites-endpoint.php: BP_REST_Group_Invites_Endpoint::delete_item() |
Remove (reject/delete) a group invitation. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.