Changes for page XWiki Users
Last modified by bougault on 2022/12/20 15:43
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -6,8 +6,10 @@ 6 6 #set($userDoc = $xwiki.getDocument($userId)) 7 7 #set($obj = $userDoc.getObject("XWiki.XWikiUsers")) 8 8 ##$obj.set("email", "") 9 - #set($lastName = $obj.get("last_name").substring(0,1).toUpperCase()) 10 - $obj.set("last_name", $lastName.concat(".")) 9 + #set($lastName = $obj.get("last_name")) 10 + #if($lastName !== "") 11 + $obj.set("last_name", $lastName.substring(0,1).toUpperCase().concat(".")) 12 + #end 11 11 $userDoc.save() 12 12 #end 13 13