Returns primary Surname of the individual.
Warning : no check of privacy if done in this function.

@return string Primary surname
488264
public function getUnprotectedPrimarySurname() {
		if(!$this->unprotected_prim_surname){
			$tmp=$this->gedcomrecord->getAllNames();
			$this->unprotected_prim_surname = $tmp[$this->gedcomrecord->getPrimaryName()]['surname'];
		}
		return $this->unprotected_prim_surname;
	}
108134
public function getUsername()
    {
        $username = null;
        $link = $this->getLink();

        if (!empty($link)) {
            $username = substr($link, strrpos($link, '/') + 1);
        }

        return $username;
    }
25289
public function getName()
    {
        $this->doNaming();

        if ($this->table && $database = $this->table->getDatabase()) {
            return substr($this->name, 0, $database->getMaxColumnNameLength());
        }

        return $this->name;
    }
835799
public function fullName($lastNameFirst = false)
    {
        if (!Wasabi::setting('Core.User.has_firstname_lastname')) {
            return $this->username;
        }
        if ($lastNameFirst) {
            return $this->lastname . ', ' . $this->firstname;
        }
        return $this->firstname . ' ' . $this->lastname;
    }
1073773
public function getName()
    {
      if (!$this->name) {
        $this->name = uniqid('', true).'_'.str_shuffle(implode(range('e', 'q')));
      }

      return $this->name;
    }
695312
protected function getSurnamesList() {        
        return QueryName::surnames(Globals::getTree(), $this->surname, $this->alpha, false, false);
    }
975198
public function getName()
	{
		$strName = parent::getName();
		if (empty($strName)) {
			$strName = $this->__name = $this->__generateName();
		}

		return $strName;
	}
28635
protected function getEntityNamePlural()
    {
        $name = $this->getEntityNameSingular();
        $nameParts = Text::camelCaseToSeparator($name, '#');
        $nameParts = explode('#', $nameParts);
        $lastPart = array_pop($nameParts);
        $lastPart = ucfirst(Text::plural(strtolower($lastPart)));
        array_push($nameParts, $lastPart);
        return lcfirst(implode('', $nameParts));
    }
484175
public function getName() {

		$name = $this->getFullName();

		if( empty( $name ) ) {

			$name	= $this->username;

			if( empty( $name ) ) {

				$name	= preg_split( '/@/', $this->email );
				$name	= $name[ 0 ];
			}
		}

		return $name;
	}
901632
public String getName() {
        if (name == null && securityIdentity != null) {
            name = securityIdentity.getPrincipal().getName();
        }

        return name;
    }
960693
public function getContactName()
    {
        $name = false;
        $lastNames = false;

        if ($this->getContact()) {
            $name = $this->getContact()->getName();
            $lastNames = $this->getContact()->getLastNames();
        }

        if ($name == false && $lastNames == false) {
            return $this->getUsername();
        }

        return trim($name.' '.$lastNames);
    }
626154
public function getName()
    {
        if (null === $this->name) {
            $this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir));
        }

        return $this->name;
    }
1106216
public static function userName($name = null)
    {
        if ($name !== null) {
            $email = preg_split('/\W+/', $name);
            shuffle($email);
            $email = implode(self::separator(), $email);
        } else {
            $email = sprintf(
                self::pickOne(array(
                    '%s',
                    '%s%s%s'
                )),
                Name::firstName(),
                self::separator(),
                Name::lastName()
            );
        }

        return strtolower(preg_replace('/\W/', '', $email));
    }
54330
protected function getPrimaryName() {
		if ($this->primary === null) {
			$tableModel    = $this->getTableModel();
			$this->primary = $tableModel->getModelsMetaData()->getPrimaryKeyAttributes($tableModel);
			
			if (empty($this->primary)) {
				$this->primary = false;
			}
			
			if (count($this->primary) === 1) {
				$this->primary = current($this->primary);
			}
		}
		
		if ($this->primary === false) {
			return;
		}
		
		return $this->primary;
	}
1018947
public function getPrimaryName(): int
    {
        static $language_script;

        if ($language_script === null) {
            $language_script = I18N::languageScript(WT_LOCALE);
        }

        if ($this->getPrimaryName === null) {
            // Generally, the first name is the primary one....
            $this->getPrimaryName = 0;
            // ...except when the language/name use different character sets
            foreach ($this->getAllNames() as $n => $name) {
                if (I18N::textScript($name['sort']) === $language_script) {
                    $this->getPrimaryName = $n;
                    break;
                }
            }
        }

        return $this->getPrimaryName;
    }
1276719
protected function user()
    {
        if ($this->wrappedObject->security) {
            return ' this user\'s ';
        }

        $user = $this->wrappedObject->revisionable()->withTrashed()->first(['first_name', 'last_name']);

        return ' '.$user->first_name.' '.$user->last_name.'\'s ';
    }
679343
protected function getPrimaryKeyName(Field $primaryField = null, $primaryKey = 'id')
    {
        return !is_null($primaryField) ? $primaryField->name : $primaryKey;
    }