Try to get first and last name from email address.

@return array
490066
public function getFirstAndLastNameFromEmail()
    {
        $exploded_full_name = explode(' ', str_replace(['.', '-', '_'], [' ', ' ', ' '], substr($this->getEmail(), 0, strpos($this->getEmail(), '@'))));

        if (count($exploded_full_name) === 1) {
            $first_name = mb_strtoupper(mb_substr($exploded_full_name[0], 0, 1)) . mb_substr($exploded_full_name[0], 1);
            $last_name = '';
        } else {
            $full_name = [];

            foreach ($exploded_full_name as $k) {
                $full_name[] = mb_strtoupper(mb_substr($k, 0, 1)) . mb_substr($k, 1);
            }

            $first_name = array_shift($full_name);
            $last_name = implode(' ', $full_name);
        }

        return [$first_name, $last_name];
    }
703008
protected function _getFullName()
    {
        if (empty($this->_properties['first_name']) || empty($this->_properties['last_name'])) {
            return null;
        }

        return sprintf('%s %s', $this->_properties['first_name'], $this->_properties['last_name']);
    }
1170707
public function getAddressStrings(): array
    {
        $strings = [];
        foreach ($this->addresses as $address) {
            $str = $address->getEncodedAddress();
            if ($address instanceof NamedAddress && $name = $address->getName()) {
                $str = $this->createPhrase($this, $name, $this->getCharset(), empty($strings)).' <'.$str.'>';
            }
            $strings[] = $str;
        }

        return $strings;
    }
475896
public function getParams() {
        $model          = $this->getModel();        
        $emailFields    = $model->fields->getFields('type', 'email');

        if (!$emailFields) {
            return;
        }

        $emailFieldNames = array();
        foreach ($emailFields as $field) {
            $emailFieldNames[] = $field->name;
        }

        return $emailFieldNames;
    }
889799
def _get_first_last(details):
    
    if "first_name" in details and "last_name" in details:
        return details["first_name"], details["last_name"]
    elif "first_name" in details:
        lst = details["first_name"].rsplit(" ", 1)
        if len(lst) == 2:
            return lst
        else:
            return lst[0], ""
    elif "last_name" in details:
        return "", details["last_name"]

    return "", ""
1367698
public function getNameAttribute($value)
    {
        if($value){
            return $value;
        } elseif(!empty($this->first_name) && !empty($this->last_name)){
            return $this->first_name.' '.$this->last_name;
        } elseif(!empty($this->first_name) && empty($this->last_name)){
            return $this->first_name;
        } elseif(empty($this->first_name) && !empty($this->last_name)){
            return $this->last_name;
        } else{
            return $this->email;
        }
    }
312516
protected function getListAddress()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;
        $addresses = (array) $this->address->getList($conditions);

        $this->prepareListAddress($addresses);
        return $addresses;
    }
224474
protected function _GetFilter() {
      $Filter = $this->Request->Get('Filter');
      if ($Filter) {
         $Parts = explode(' ', $Filter, 3);
         if (count($Parts) < 2)
            return FALSE;
         
         $Field = $Parts[0];
         if (count($Parts) == 2) {
            $Op = '=';
            $FilterValue = $Parts[1];
         } else {
            $Op = $Parts[1];
            if (!in_array($Op, array('=', 'like'))) {
               $Op = '=';
            }
            $FilterValue = $Parts[2];
         }
         
         if (strpos($Field, '.') !== FALSE)
            $Field = array_pop(explode('.', $Field));
         
         if (!in_array($Field, array('Name', 'Email', 'LastIPAddress', 'InsertIPAddress', 'RankID', 'DateFirstVisit', 'DateLastVisit')))
            return FALSE;

         return array("$Field $Op" => $FilterValue);
      }
      return FALSE;
   }
958465
public function getCustomerData()
    {
        $data = array(
            'disable_send_mail' => $this->getSendMail(),
            'locale'            => $this->getLocale(),
        );

        if (is_null($this->getCard())) {
            return array_filter($data);
        }

        $cardData = array(
            'address1'         => $this->getCard()->getAddress1(),
            'address2'         => $this->getCard()->getAddress2(),
            'city'              => $this->getCard()->getCity(),
            'country'           => $this->getCard()->getCountry(),
            'email'             => $this->getCard()->getEmail(),
            'first_name'        => $this->getCard()->getFirstName(),
            'house_number'      => $this->getVar1(),
            'last_name'         => $this->getCard()->getLastName(),
            'phone'             => $this->getCard()->getPhone(),
            'state'             => $this->getCard()->getState(),
            'zip_code'          => $this->getCard()->getPostcode(),
        );

        return array_filter(
            array_merge($data, $cardData)
        );
    }
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;
    }
1360113
private function getInitialLettersList() { 
        $list = array();
        /** @var \Fisharebest\Webtrees\Tree $tree */
        $tree = $this->data->get('tree');
		$script_base_url = WT_SCRIPT_NAME . '?mod=' . \MyArtJaub\Webtrees\Constants::MODULE_MAJ_PATROLIN_NAME . '&mod_action=Lineage';
		
        foreach (QueryName::surnameAlpha($tree, false, false) as $letter => $count) {
            switch ($letter) {
                case '@':
                    $html = I18N::translateContext('Unknown surname', '…');
                    break;
                case ',':
                    $html = I18N::translate('None');
                    break;
                default:
                    $html = Filter::escapeHtml($letter);
                    break;
            }
            if ($count) {
                if ($letter == $this->data->get('alpha')) {
                    $list[] = '<a href="' . $script_base_url . '&alpha=' . rawurlencode($letter) . '&amp;ged=' . $tree->getNameUrl() . '" class="warning" title="' . I18N::number($count) . '">' . $html . '</a>';
                } else {
                    $list[] = '<a href="' . $script_base_url . '&alpha=' . rawurlencode($letter) . '&amp;ged=' . $tree->getNameUrl() . '" title="' . I18N::number($count) . '">' . $html . '</a>';
                }
            } else {
                $list[] = $html;
            }
        }
    
        // Search spiders don't get the "show all" option as the other links give them everything.
        if (!Auth::isSearchEngine()) {
            if ($this->data->get('show_all') === 'yes') {
                $list[] = '<span class="warning">' . I18N::translate('All') . '</span>';
            } else {
                $list[] = '<a href="' . $script_base_url . '&show_all=yes' . '&amp;ged=' . $tree->getNameUrl() . '">' . I18N::translate('All') . '</a>';
            }
        }
    
        return $list;
    }
1312574
public function firsts()
    {
        $messages = [];
        foreach ($this->errorMessages as $fieldsMessages) {
            foreach ($fieldsMessages as $fieldMessage) {
                $messages[] = $fieldMessage;
                break;
            }
        }

        return $messages;
    }
422241
private function customerNameA() {return dfc($this, function() {
		/** @var O $o */ $o = $this->o();
		/** @var OA $ba */ $ba = $this->addressB();
		/** @var C|DFCustomer $c */
		/** @var string|null $f */
		return ($f = $o->getCustomerFirstname()) ? [$f, $o->getCustomerLastname()] : (
			($c = $o->getCustomer()) && ($f = $c->getFirstname()) ? [$f, $c->getLastname()] : (
				$f = $ba->getFirstname() ? [$f, $ba->getLastname()] : (
					($sa = $this->addressS()) && ($f = $sa->getFirstname()) ? [$f, $sa->getLastname()] :
						[null, null]
				)
			)
		);
	});}
898466
public function getShortNames()
    {
        $names = [];

        $used = [];
        foreach (static::SHORT_NAME as $name => $value) {
            if ($this->has($value) && !in_array($value, $used)) {
                $names[] = $name;
                $used[] = $value;
            }
        }

        return $names;
    }
551036
protected function getMailerParams()
    {
        $app = $this->getApp();

        return [
            'base_url' => $app['base_url'],
            'siteEmail' => $app['config']->get('app.email'),
            'email' => $this->email,
            'username' => $this->name(true),
            'to' => [
                [
                    'email' => $this->email,
                    'name' => $this->name(true),
                ],
            ],
        ];
    }
1157589
protected function getBillingAddressParamsStructure()
    {
        return [
            'first_name' => $this->billing_first_name,
            'last_name'  => $this->billing_last_name,
            'address1'   => $this->billing_address1,
            'address2'   => $this->billing_address2,
            'zip_code'   => $this->billing_zip_code,
            'city'       => $this->billing_city,
            'state'      => $this->billing_state,
            'country'    => $this->billing_country
        ];
    }
532197
protected function getShippingAddressParamsStructure()
    {
        return [
            'first_name' => $this->shipping_first_name,
            'last_name'  => $this->shipping_last_name,
            'address1'   => $this->shipping_address1,
            'address2'   => $this->shipping_address2,
            'zip_code'   => $this->shipping_zip_code,
            'city'       => $this->shipping_city,
            'state'      => $this->shipping_state,
            'country'    => $this->shipping_country
        ];
    }