Update src/Security/Member.php

Co-authored-by: Steve Boyd <emteknetnz@gmail.com>
This commit is contained in:
Thomas Portelange 2021-03-22 09:02:18 +01:00 committed by GitHub
parent 19052e6924
commit 22b2d58b5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -871,7 +871,7 @@ class Member extends DataObject
*/ */
public function onBeforeWrite() public function onBeforeWrite()
{ {
// Prevent spaces in emails // Remove any line-break or space characters accidentally added during a copy-paste operation
if ($this->Email) { if ($this->Email) {
$this->Email = trim($this->Email); $this->Email = trim($this->Email);
} }