diff --git a/src/Cms/User.php b/src/Cms/User.php index 8dc5c7d4ab..c226633d5d 100644 --- a/src/Cms/User.php +++ b/src/Cms/User.php @@ -498,8 +498,7 @@ public function name(): Field */ public function nameOrEmail(): Field { - $name = $this->name(); - return $name->isNotEmpty() ? $name : new Field($this, 'email', $this->email()); + return $this->name()->or(new Field($this, 'email', $this->email())); } /**