| ... |
... |
@@ -1,18 +1,36 @@ |
| 1 |
|
-{{velocity}} |
|
1 |
+{{velocity output="no"}} |
| 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 |
5 |
#foreach($userId in $users) |
| 6 |
6 |
#set($userDoc = $xwiki.getDocument($userId)) |
| 7 |
7 |
#set($obj = $userDoc.getObject("XWiki.XWikiUsers")) |
| 8 |
8 |
#set($lastName = $obj.get("last_name")) |
| 9 |
9 |
#if(!$lastName.matches('[A-Z]{1}\.')) |
| 10 |
|
- user $userId lastname does not match privacy rules |
|
10 |
+ #set($warnings = $warnings.add("user $userId lastname does not match privacy rules")) |
| 11 |
11 |
#end |
| 12 |
12 |
|
| 13 |
13 |
#set($email = $obj.getValue("email")) |
| 14 |
14 |
#if($email != "") |
| 15 |
|
- 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 |
17 |
#end |
| 18 |
18 |
{{/velocity}} |
|
19 |
+ |
|
20 |
+{{velocity}} |
|
21 |
+ |
|
22 |
+{{html clean="false"}} |
|
23 |
+<ul> |
|
24 |
+#foreach($warning in $warnings) |
|
25 |
+ <li>$warning</li> |
|
26 |
+#end |
|
27 |
+</ul> |
|
28 |
+{{/html}} |
|
29 |
+{{/velocity}} |
|
30 |
+ |
|
31 |
+{{velocity}} |
|
32 |
+ |
|
33 |
+{{html clean="false"}} |
|
34 |
+$warnings |
|
35 |
+{{/html}} |
|
36 |
+{{/velocity}} |