bp_get_displayed_user_email()

Get the email address of the displayed user.

Description

Return

(string)

Source

File: bp-members/bp-members-template.php

1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
function bp_get_displayed_user_email() {
    $bp = buddypress();
 
    // If displayed user exists, return email address.
    if ( isset( $bp->displayed_user->userdata->user_email ) )
        $retval = $bp->displayed_user->userdata->user_email;
    else
        $retval = '';
 
    /**
     * Filters the email address of the displayed user.
     *
     * @since BuddyPress 1.5.0
     *
     * @param string $retval Email address for displayed user.
     */
    return apply_filters( 'bp_get_displayed_user_email', esc_attr( $retval ) );
}

Changelog

Changelog
Version Description
BuddyPress 1.5.0 Introduced.

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.