From d57f56e44f99d0ff98db31368a05bb87a5b4ff4f Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 8 May 2025 16:20:26 -0700 Subject: [PATCH] Handle settings not being available --- app/Models/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/User.php b/app/Models/User.php index a115852d5c..9b211e6a04 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -320,7 +320,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo { $setting = Setting::getSettings(); - if ($setting->name_display_format=='last_first') { + if ($setting?->name_display_format == 'last_first') { return ($this->last_name) ? $this->last_name.' '.$this->first_name : $this->first_name; } return $this->last_name ? $this->first_name.' '.$this->last_name : $this->first_name;