Changes for page Query Users
Last modified by bougault on 2023/09/28 17:01
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,19 +2,18 @@ 2 2 #set($query = $services.query.xwql("from doc.object(XWiki.XWikiUsers) as users")) 3 3 #set($users = $query.execute()) 4 4 #set($warnings = []) 5 -#set($userIds = []) 6 6 #foreach($userId in $users) 7 7 #set($userDoc = $xwiki.getDocument($userId)) 8 8 #set($obj = $userDoc.getObject("XWiki.XWikiUsers")) 9 9 #set($lastName = $obj.get("last_name")) 10 10 #if(!$lastName.matches('[A-Z]{1}\.')) 11 - $warnings.add("user $userId lastname does not match privacy rules") 10 + #set($warnings = $warnings.add("user $userId lastname does not match privacy rules")) 12 12 #end 12 + 13 13 #set($email = $obj.getValue("email")) 14 14 #if($email != "") 15 - $warnings.add("user $userId email does not match privacy rules") 15 + #set($warnings = $warnings.add("user $userId email does not match privacy rules")) 16 16 #end 17 - $userIds.add($userId) 18 18 #end 19 19 {{/velocity}} 20 20 ... ... @@ -21,15 +21,6 @@ 21 21 {{velocity}} 22 22 23 23 {{html clean="false"}} 24 -<ul> 25 -#foreach($warning in $warnings) 26 - <li>$warning</li> 27 -#end 28 -</ul> 29 -<ul> 30 -#foreach($user in $userIds) 31 - <li>$user</li> 32 -#end 33 -</ul> 23 +$warnings 34 34 {{/html}} 35 35 {{/velocity}}