How to get Full Name of logged in user?

Earlier I was getting Full Name of logged in user using

 

$memID = $_COOKIE['memberID'];

getNickName($memID);

 

But after upgrade to 7.2, it is changed. Now I am getting Username of logged in user using that.

How to get  Full Name of logged in user?

Quote · 3 Oct 2015

anyone?

Quote · 4 Oct 2015

Are you sure about that?  NickName has always been User Name, not Full Name, at least with the 7.1.x line.

Geeks, making the world a better place
Quote · 4 Oct 2015

@GG. He is sure. Later versions of dolphin 7.1 allowed full names to be used, and the getNickName function was altered to retrived the full name of the member and a new function called getUsername was added to get the users nickname.

@IrfanAlam. Dolphin 7.2 does not have a function to so this. It is an apparent bug. Boonex has removed the FirstName and LastName fields from the Profile table and replaced it with a FullName field but neglected to update the functions to deal with that change.

To solve, add a new function in inc\profiles.inc.php

Look for the getUserName function at about line 445. And add this new function right after it.

function getFullName( $ID = '' )
{
    if ( !$ID && !empty($_COOKIE['memberID']) )
        $ID = (int)$_COOKIE['memberID'];

    if ( !$ID )
        return '';

    $aProfile = getProfileInfo($ID);
    if (!$aProfile)
        return false;

    return $aProfile['FullName'];
}


Then to get the members full name you call this new function instead.

https://www.deanbassett.com
Quote · 4 Oct 2015

I would submit this to be added to the new Dolphin code, but AlexT is slow to look at existing code pull requests. I have had one pending for a few days and it's just sitting there. I am not going to submit any more changes until the others i have submitted have been merged or rejected, or something.

As i suspected, asking for help from the developers here by allowing us to fork is not going to work.

https://www.deanbassett.com
Quote · 4 Oct 2015

Issue reported.

https://github.com/boonex/dolphin.pro/issues/84

https://www.deanbassett.com
Quote · 4 Oct 2015

I also made a request to bring back the first and last name fields and let site owners choose what they want. Instead of pushing them to full name or username. We have a dating site, so we like to use First name because of the privacy / anonymity from members. And because of the personal approach we don't like to use the username in communication towards the members.

Quote · 4 Oct 2015

Quote · 4 Oct 2015

 

@GG. He is sure. Later versions of dolphin 7.1 allowed full names to be used, and the getNickName function was altered to retrived the full name of the member and a new function called getUsername was added to get the users nickname..

Yes, I knew they allowed full names but I did not know that Boonex fucked with an established function changing it instead of introducing a new one; I guess they decided they would fucked with everyone, site admins as well as developers instead of doing it the correct way.  

Geeks, making the world a better place
Quote · 4 Oct 2015

 

@IrfanAlam. Dolphin 7.2 does not have a function to so this. It is an apparent bug. Boonex has removed the FirstName and LastName fields from the Profile table and replaced it with a FullName field but neglected to update the functions to deal with that change.

Oh, it gets even better, they decided to fuck with the database as well;

Geeks, making the world a better place
Quote · 4 Oct 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.