Contents
bp_core_get_user_domain( int $user_id, string|bool $user_nicename = false, string|bool $user_login = false )
Return the domain for the passed user: e.g. http://example.com/members/andy/.
Description
Parameters
- $user_id
-
(Required) The ID of the user.
- $user_nicename
-
(Optional) user_nicename of the user.
Default value: false
- $user_login
-
(Optional) user_login of the user.
Default value: false
Return
(string)
Source
File: bp-members/bp-members-functions.php
function bp_core_get_user_domain( $user_id = 0, $user_nicename = false, $user_login = false ) { if ( empty( $user_id ) ) { return; } $username = bp_core_get_username( $user_id, $user_nicename, $user_login ); if ( bp_is_username_compatibility_mode() ) { $username = rawurlencode( $username ); } $after_domain = bp_core_enable_root_profiles() ? $username : bp_get_members_root_slug() . '/' . $username; $domain = trailingslashit( bp_get_root_domain() . '/' . $after_domain ); // Don't use this filter. Subject to removal in a future release. // Use the 'bp_core_get_user_domain' filter instead. $domain = apply_filters( 'bp_core_get_user_domain_pre_cache', $domain, $user_id, $user_nicename, $user_login ); /** * Filters the domain for the passed user. * * @since BuddyPress 1.0.1 * * @param string $domain Domain for the passed user. * @param int $user_id ID of the passed user. * @param string $user_nicename User nicename of the passed user. * @param string $user_login User login of the passed user. */ return apply_filters( 'bp_core_get_user_domain', $domain, $user_id, $user_nicename, $user_login ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.0.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-members/bp-members-functions.php: bp_core_get_username() |
Return the username for a user based on their user id. |
bp-members/bp-members-functions.php: bp_core_get_user_domain |
Filters the domain for the passed user. |
bp-members/bp-members-template.php: bp_get_members_root_slug() |
Return the members component root slug. |
bp-core/bp-core-template.php: bp_get_root_domain() |
Return the “root domain”, the URL of the BP root blog. |
bp-core/bp-core-functions.php: bp_is_username_compatibility_mode() |
Are we running username compatibility mode? |
bp-core/bp-core-catchuri.php: bp_core_enable_root_profiles() |
Are root profiles enabled and allowed? |
Used By | Description |
---|---|
bp-media/bp-media-template.php: bp_get_media_link() |
Return the media link. |
bp-document/classes/class-bp-document.php: BP_Document::get_folder_data() |
Convert document IDs to document objects, as expected in template loop. |
bp-document/bp-document-template.php: bp_get_document_link() |
Return the document link. |
bp-document/bp-document-template.php: bp_get_folder_link() |
Return the folder description. |
bp-document/bp-document-template.php: bp_get_folder_folder_link() | |
bp-templates/bp-nouveau/includes/document/ajax.php: bp_nouveau_ajax_document_get_document_description() |
Get description for the document. |
bp-templates/bp-nouveau/includes/media/ajax.php: bp_nouveau_ajax_media_get_media_description() |
Get description for the media. |
bp-templates/bp-nouveau/includes/activity/template-tags.php: bp_nouveau_activity_privacy() |
Output the privacy option inside an Activity Loop. |
bp-templates/bp-nouveau/includes/groups/ajax.php: bp_nouveau_ajax_groups_get_group_members_listing() |
Retrieve the possible members list to send group message. |
bp-settings/classes/class-bp-rest-account-settings-options-endpoint.php: BP_REST_Account_Settings_Options_Endpoint::update_general_fields() |
Update general fields. |
bp-settings/classes/class-bp-rest-account-settings-options-endpoint.php: BP_REST_Account_Settings_Options_Endpoint::update_delete_account_fields() |
Delete Account “Export Data”. |
bp-messages/bp-messages-functions.php: group_messages_notification_new_message() |
Email message recipients to alert them of a new unread group message. |
bp-messages/classes/class-bp-rest-messages-endpoint.php: BP_REST_Messages_Endpoint::prepare_recipient_for_response() |
Prepares recipient data for the REST response. |
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::user_data() |
Method to facilitate fetching of user data. |
bp-forums/members.php: BBP_BuddyPress_Members::user_profile_url() |
Override Forums profile URL with BuddyBoss profile URL |
bp-forums/members.php: BBP_BuddyPress_Members::get_favorites_permalink() |
Override Forums favorites URL with BuddyBoss profile URL |
bp-forums/members.php: BBP_BuddyPress_Members::get_subscriptions_permalink() |
Override Forums subscriptions URL with BuddyBoss profile URL |
bp-media/bp-media-template.php: bp_get_album_link() |
Return the album description. |
bp-notifications/bp-notifications-template.php: bp_get_notifications_read_permalink() |
Return the read notifications permalink. |
bp-notifications/bp-notifications-template.php: bp_get_notifications_permalink() |
Return the notifications permalink. |
bp-notifications/bp-notifications-template.php: bp_get_notifications_unread_permalink() |
Return the unread notifications permalink. |
bp-blogs/bp-blogs-activity.php: bp_blogs_sync_add_from_activity_comment() |
Syncs activity comments and posts them back as blog comments. |
bp-xprofile/bp-xprofile-activity.php: bp_xprofile_updated_profile_activity() |
Add an activity item when a user has updated his profile. |
bp-xprofile/bp-xprofile-activity.php: bp_xprofile_format_activity_action_updated_profile() |
Format ‘updated_profile’ activity actions. |
bp-messages/bp-messages-filters.php: maybe_redirects_to_previous_thread_message() |
[maybe_redirects_to_previous_thread_message description] |
bp-messages/bp-messages-star.php: bp_get_the_message_star_action_link() |
Return the link or raw URL for starring or unstarring a message. |
bp-messages/bp-messages-template.php: bp_get_the_message_thread_mark_read_url() |
Return the URL used for marking a single message thread as read. |
bp-messages/bp-messages-template.php: bp_get_the_message_thread_mark_unread_url() |
Return the URL used for marking a single message thread as unread. |
bp-messages/bp-messages-template.php: bp_get_message_thread_view_link() |
Get the permalink of a particular thread. |
bp-messages/bp-messages-template.php: bp_get_message_thread_delete_link() |
Generate the URL for deleting the current thread. |
bp-messages/bp-messages-functions.php: messages_notification_new_message() |
Email message recipients to alert them of a new unread private message. |
bp-groups/bp-groups-admin.php: bp_groups_admin_edit_metabox_members() |
Renders the Members metabox on single group pages. |
bp-groups/classes/class-bp-groups-invite-template.php: BP_Groups_Invite_Template::the_invite() |
Sets up the invite to show. |
bp-groups/bp-groups-functions.php: bp_groups_get_invited_by() |
Get inviter for member’s group invitation |
bp-groups/bp-groups-template.php: bp_get_group_member_link() |
Get the anchor tag of the group member profile url with link of displayed name. |
bp-groups/bp-groups-template.php: bp_get_group_member_domain() |
Get the current group member profile url in the loop. |
bp-groups/bp-groups-template.php: bp_group_list_admins() |
Output markup listing group admins. |
bp-groups/bp-groups-template.php: bp_group_list_mods() |
Output markup listing group mod. |
bp-groups/bp-groups-template.php: bp_get_group_creator_permalink() |
Return the permalink of the creator of the current group in the loop. |
bp-groups/bp-groups-notifications.php: groups_notification_new_membership_request() |
Notify group admin about new membership request. |
bp-groups/bp-groups-notifications.php: groups_notification_group_invites() |
Notify a member they have been invited to a group. |
bp-members/bp-members-functions.php: bp_core_get_userlink() |
Return a HTML formatted link for a user with the user’s full name as the link text. |
bp-members/actions/random.php: bp_core_get_random_member() |
Redirect to a random member page when visiting a ?random-member URL. |
bp-members/classes/class-bp-members-admin.php: BP_Members_Admin::user_admin_status_metabox() |
Render the Status metabox for user’s profile screen. |
bp-members/classes/class-bp-members-component.php: BP_Members_Component::setup_globals() |
Set up bp-members global settings. |
bp-members/classes/class-bp-core-members-switching.php: BP_Core_Members_Switching::action_bp_button() |
Adds a ‘View As’ link to each member’s profile page and profile listings in BuddyPress. |
bp-members/classes/class-bp-core-members-switching.php: BP_Core_Members_Switching::get_redirect() |
Fetches the URL to redirect to for a given user (used after switching). |
bp-members/bp-members-template.php: bp_get_add_switch_button() |
Returns a view as/back to button for a given user depending on the switching status. |
bp-members/bp-members-template.php: bp_get_member_permalink() |
Get the permalink for the current member in the loop. |
bp-members/bp-members-filters.php: bp_members_edit_profile_url() |
Filter the user profile URL to point to BuddyPress profile edit. |
bp-invites/bp-invites-admin.php: bp_invite_show_data() |
Display data by column and post id. |
bp-invites/bp-invites-admin.php: bp_invite_hide_quick_edit() |
Hide quick edit link. |
bp-friends/bp-friends-functions.php: friends_notification_new_request() |
Send notifications related to a new friendship request. |
bp-friends/bp-friends-functions.php: friends_notification_accepted_request() |
Send notifications related to the acceptance of a connection request. |
bp-friends/bp-friends-template.php: bp_friends_random_friends() |
Output a block of random friends. |
bp-friends/bp-friends-template.php: bp_friends_random_members() |
Pull up a group of random members, and display some profile data about them. |
bp-friends/classes/class-bp-core-friends-widget.php: BP_Core_Friends_Widget::widget() |
Display the widget. |
bp-templates/bp-nouveau/includes/activity/ajax.php: bp_nouveau_ajax_spam_activity() |
AJAX spam an activity item or comment. |
bp-templates/bp-nouveau/includes/activity/ajax.php: bp_nouveau_ajax_delete_activity() |
Deletes an Activity item/Activity comment item received via a POST request. |
bp-templates/bp-nouveau/includes/groups/ajax.php: bp_nouveau_ajax_get_users_to_invite() |
AJAX get list of members to invite to group. |
bp-templates/bp-nouveau/includes/template-tags.php: bp_nouveau_get_customizer_link() |
Get a link to reach a specific section into the customizer |
bp-core/admin/bp-core-admin-functions.php: bp_core_admin_user_row_actions() |
Add “Mark as Spam/Ham” button to user row actions. |
bp-core/admin/bp-core-admin-settings.php: bp_admin_setting_callback_heartbeat() |
Allow Heartbeat to refresh activity stream. |
bp-core/deprecated/buddypress/2.1.php: bp_adminbar_authors_menu() |
Add the Blog Authors menu to the BuddyBar (visible when not logged in). |
bp-core/deprecated/buddypress/1.5.php: groups_at_message_notification() |
Send an email and a BP notification on receipt of an @-mention in a group |
bp-core/bp-core-wp-emails.php: wp_notify_postauthor() |
Notify an author (and/or others) of a comment/trackback/pingback on a post. |
bp-core/bp-core-wp-emails.php: wp_notify_moderator() |
Notifies the moderator of the site about a new comment that is awaiting approval. |
bp-core/classes/class-bp-email-tokens.php: BP_Email_Tokens::token__status_update() |
Generate the output for token status_update |
bp-core/classes/class-bp-email-tokens.php: BP_Email_Tokens::token__activity_reply() |
Generate the output for token activity_reply |
bp-core/classes/class-bp-email-tokens.php: BP_Email_Tokens::token__message() |
Generate the output for token message |
bp-core/classes/class-bp-email-tokens.php: BP_Email_Tokens::token__member_card_small() |
Generate the output for token member.card |
bp-core/classes/class-bp-email-tokens.php: BP_Email_Tokens::token__poster_url() |
Generate the output for token poster.url |
bp-core/classes/class-bp-email-tokens.php: BP_Email_Tokens::token__sender_url() |
Generate the output for token sender.url |
bp-core/classes/class-bp-email-tokens.php: BP_Email_Tokens::token__reply_content() |
Generate the output for token reply_content |
bp-core/classes/class-bp-email-tokens.php: BP_Email_Tokens::token__discussion_content() |
Generate the output for token discussion.content |
bp-core/classes/class-bp-core-user.php: BP_Core_User::populate() |
Populate the instantiated class with data based on the User ID provided. |
bp-core/bp-core-functions.php: bp_email_unsubscribe_handler() |
Handles unsubscribing user from notification emails. |
bp-core/bp-core-filters.php: bp_email_set_default_tokens() |
Add default email tokens. |
bp-core/bp-core-filters.php: bp_core_filter_comments() |
Filter the blog post comments array and insert BuddyPress URLs for users. |
bp-activity/screens/permalink.php: bp_activity_action_permalink_router() |
Catch and route requests for single activity item permalinks. |
bp-activity/bp-activity-filters.php: bp_activity_at_name_filter() |
Find and link @-mentioned users in the contents of a given item. |
bp-activity/bp-activity-filters.php: bp_activity_at_name_filter_updates() |
Catch mentions in an activity item before it is saved into the database. |
bp-activity/classes/class-bp-activity-oembed-extension.php: BP_Activity_oEmbed_Extension::set_oembed_response_data() |
Sets the oEmbed response data for our activity item. |
bp-activity/bp-activity-template.php: bp_activity_comments_user_avatars() |
Echo a list of linked avatars of users who have commented on the current activity item. |
bp-activity/bp-activity-template.php: bp_get_activity_comment_user_link() |
Return the author link for the activity comment currently being displayed. |
bp-activity/bp-activity-template.php: bp_get_activity_user_link() |
Return the activity user link. |
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.