mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Member updateName extension hook
Allow updating the Member name from an extension
This commit is contained in:
parent
52744c7848
commit
f78c3ee5bb
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user