From 1752eecf8f40f6bd1b66e769a46b054a2049ed4a Mon Sep 17 00:00:00 2001 From: Melwin Date: Sun, 15 Mar 2026 01:13:15 +0530 Subject: [PATCH 1/2] fix(user): Add middle name to full name --- frappe/core/doctype/user/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index 99b68ed536..90ee8617d0 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -361,7 +361,7 @@ class User(Document): self.set(field, sanitize_html(field_value, always_sanitize=True)) def set_full_name(self): - self.full_name = " ".join(filter(None, [self.first_name, self.last_name])) + self.full_name = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name])) def check_enable_disable(self): # do not allow disabling administrator/guest From 83200ce4ee7183544f9ff9998a47b92fbe5309c8 Mon Sep 17 00:00:00 2001 From: Melwin Date: Mon, 16 Mar 2026 22:46:43 +0530 Subject: [PATCH 2/2] fix(user): semgrep compliant fix for full name --- frappe/core/doctype/user/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py index 90ee8617d0..5f4b1d3fae 100644 --- a/frappe/core/doctype/user/user.py +++ b/frappe/core/doctype/user/user.py @@ -361,7 +361,7 @@ class User(Document): self.set(field, sanitize_html(field_value, always_sanitize=True)) def set_full_name(self): - self.full_name = " ".join(filter(None, [self.first_name, self.middle_name, self.last_name])) + self.full_name = " ".join(p for p in [self.first_name, self.middle_name, self.last_name] if p) def check_enable_disable(self): # do not allow disabling administrator/guest