X-Git-Url: http://git.hcoop.net/hcoop/portal.git/blobdiff_plain/a4ccdb5e625953aa6ece8874b34c811353144426..3b54a6660b3834d3c47d86cdcf6d039609772a26:/users.mlt diff --git a/users.mlt b/users.mlt index fbd60aa..5d960da 100644 --- a/users.mlt +++ b/users.mlt @@ -6,10 +6,10 @@ ref showNormal = true; if $"cmd" = "Create" then if not (Init.validUsername ($"name")) then %> -

Invalid username

+

Invalid username

<% else switch Init.userNameToId ($"name") of SOME _ => %> -

Username already in use

+

Username already in use

<% | NONE => val ap = Web.stoi ($"app"); val bal = @@ -17,7 +17,7 @@ if $"cmd" = "Create" then "" => Balance.addBalance ($"name") | s => Web.stoi s); - val id = Init.addUser ($"name", $"rname", bal, ap); + val id = Init.addUser ($"name", $"rname", bal, ap, 1); Group.addToGroups (id, map Web.stoi (Web.getMultiParam "grp")); if $"amount" <> "" then @@ -27,25 +27,32 @@ if $"cmd" = "Create" then Money.applyCharges trn end; + App.add ap; + if $"subscribe" = "on" then if not (Pref.subscribe ("hcoop-announce", $"name" ^ Init.emailSuffix)) then - %>

Error subscribing to hcoop-announce

<% + %>

Error subscribing to hcoop-announce

<% end - end %> -

Member added

+ end; + + if $"nomail" = "" then + App.welcome ap + end + + %>

Member added

<% end end elseif $"mod" <> "" then showNormal := false; val user = Init.lookupUser (Web.stoi ($"mod")) %> -

Modify member record

+

Modify member record

"> - - - -
Name:
Real name:
Funded by: + + +
Name:
Real name:
Funded by: - - -
Name:
Real name:
Funded by: + + + - - - - + + +
Name:
Real name:
Funded by:
Initial transaction amount:
Initial transaction description:
Subscribe to hcoop-announce
Groups:
Initial transaction amount:
Initial transaction description:
Subscribe to hcoop-announce
Groups:
-

Manage current members

+<% elseif $"cmd" = "diff" then + showNormal := false; + + val against = (case $"against" of + "" => Init.usersInAfs () + | x => String.tokens Char.isSpace x); + + val diff = Init.usersDiff (Init.listUsernames (), against) %> + +

User diff

+ +

Only on the portal:

+ + +

Only in AFS:

+
    +<% foreach user in #onlyInSecond diff do %> +
  • <% Web.html user %>
  • +<% end %> +
+ +<% end %> + +<% if showNormal then %> + +Add a user manually
+<% if $"showretired" = "1" then %> +Hide Retired Members
+<% else %> +Show Retired Members
+<% end %> + +

Manage current members

- -<% foreach user in Init.listUsers () do %> -
<% Web.html (#name user) %> + +<% foreach user in List.filter (fn u => ($"showretired" = "1") or not (Group.userInGroupName (#id u, "retired"))) (Init.listUsers ()) do %> + + + + + + <% end %>
<% Web.html (#name user) %> <% val bal = Balance.lookupBalance (#bal user); if #name bal <> #name user then %> <% Web.html (#name bal) %> <% end %> - [Modify] [Delete]
[Modify] [Delete] + [Retire]
-
Grandfather old users to have applications
+
+How does the set of users in AFS compare with the set of active portal users?
<% end %>