public function getName()
    {
        if ($this->hasString('name')) {
            $result = $this->getAsString('name');
        } elseif ($this->hasFirstName() || $this->hasLastName()) {
            $result = trim($this->getFirstName() . ' ' . $this->getLastName());
        } else {
            $result = $this->getUserName();
        }

        return $result;
    }
public function getName()
    {
        if ($this->hasString('name')) {
            $result = $this->getAsString('name');
        } elseif ($this->hasFirstName() || $this->hasLastName()) {
            $result = trim($this->getFirstName() . ' ' . $this->getLastName());
        } else {
            $result = $this->getUserName();
        }

        return $result;
    }
public function getName ( ) { if ( $ this -> hasString ( 'name' ) ) { $ result = $ this -> getAsString ( 'name' ) ; } elseif ( $ this -> hasFirstName ( ) || $ this -> hasLastName ( ) ) { $ result = trim ( $ this -> getFirstName ( ) . ' ' . $ this -> getLastName ( ) ) ; } else { $ result = $ this -> getUserName ( ) ; } return $ result ; }
Gets this user's real name.

First, the "name" field is checked. If that is empty, the fields
"first_name" and "last_name" are checked. If those are empty as well,
the user name is returned as a fallback value.

@return string the user's real name, will not be empty for valid records
Gets this user s real name .