Re: Display email on profilepage
Hi there,
function getDisplayedUserEmail() {
global $bp;
global $wpdb;
$id = $bp->displayed_user->id;
$request = “SELECT * FROM $wpdb->users WHERE ID =” . $id . “”;
$result = $wpdb->get_row($request, ARRAY_A);
return $result;
}
Here is a possible solution. Just copy/paste into either function.php or bp-custom.php. I had to this through database query, because I could not find a bp-function for this, or none of them worked for me.
I’m not a PHP coder so If you can simplify the code, or do it better, feel free to modify it.
You have to call this function in ‘profile-loop.php’. You can find that in members/single/profile/ template folder.
You can call it after the endwhile or whereever you want.