The following piece of code displays my name if I see my profile page. I want to modify it, so that if I will visit the profile page of another user, his profile page to displays both name and email.
<?php
if( isset($_GET['email']) === true && empty($_GET['email']) === false ){
$email = $_GET['email'];
if(user_exists($email) === true) {
$user_id = user_id_from_email($email);
$profile_data = user_data($user_id,'name','email');
echo $profile_data['name'];
?>