Displays username, but not maiden or last name

This just displays the username aka first name. I want it to also display the member’s last name and maiden name if they have one.

/////// Mechanism to Display Real Name Next to Username - real name(username) //////////////////////////

if ($firstname != “”) {
$mainNameLine = “$firstname $maidenname $lastname ($username)”;
$username = $firstname;
} else {
$mainNameLine = $username; $maidenname; $lastname;
}

I want to display maiden and last name along with the user name. I’ve tried everything I could think of. Any suggestions?

Thanks,
Scott