public static function getUserName(User $user, $defaultToLabel = false)
    {
        $firstName = self::getUserStringProp($user, GenerisRdf::PROPERTY_USER_FIRSTNAME);
        $lastName = self::getUserStringProp($user, GenerisRdf::PROPERTY_USER_LASTNAME);
        
        $userName = trim($firstName . ' ' . $lastName);
        
        if (empty($userName) && $defaultToLabel) {
            $userName = self::getUserLabel($user);
        }

        return $userName;
    }
public static function getUserName(User $user, $defaultToLabel = false)
    {
        $firstName = self::getUserStringProp($user, GenerisRdf::PROPERTY_USER_FIRSTNAME);
        $lastName = self::getUserStringProp($user, GenerisRdf::PROPERTY_USER_LASTNAME);
        
        $userName = trim($firstName . ' ' . $lastName);
        
        if (empty($userName) && $defaultToLabel) {
            $userName = self::getUserLabel($user);
        }

        return $userName;
    }
public static function getUserName ( User $ user , $ defaultToLabel = false ) { $ firstName = self :: getUserStringProp ( $ user , GenerisRdf :: PROPERTY_USER_FIRSTNAME ) ; $ lastName = self :: getUserStringProp ( $ user , GenerisRdf :: PROPERTY_USER_LASTNAME ) ; $ userName = trim ( $ firstName . ' ' . $ lastName ) ; if ( empty ( $ userName ) && $ defaultToLabel ) { $ userName = self :: getUserLabel ( $ user ) ; } return $ userName ; }
Gets the full user name
@param User $user
@param bool $defaultToLabel
@return string
Gets the full user name