Merge pull request #10513 from TheBnl/patch-3

Member updateName extension hook
This commit is contained in:
Guy Sartorelli 2022-09-27 13:17:57 +13:00 committed by GitHub
commit 7fd8ed165d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1217,7 +1217,9 @@ class Member extends DataObject
*/
public function getName()
{
return ($this->Surname) ? trim($this->FirstName . ' ' . $this->Surname) : $this->FirstName;
$name = ($this->Surname) ? trim($this->FirstName . ' ' . $this->Surname) : $this->FirstName;
$this->extend('updateName', $name);
return $name;
}