X-Git-Url: http://git.hcoop.net/bpt/portal.git/blobdiff_plain/27e48ace692e2404e160a8949cb80b2f49a765be..23bfc8776ac637a955c1f781ff20498eaf62ef5b:/pref.mlt diff --git a/pref.mlt b/pref.mlt index f4ba6fb..deea051 100644 --- a/pref.mlt +++ b/pref.mlt @@ -1,21 +1,62 @@ <% val you = Init.getUserId (); +val yourname = Init.getUserName (); +val youremail = yourname ^ "@hcoop.net"; + @header [("title", ["Member preferences"])]; if $"cmd" = "mod" then + val you_all = Init.getUser (); + + Init.modUser {you_all with + paypal = (case $"paypal" of "" => NONE | s => SOME s), + checkout = (case $"checkout" of "" => NONE | s => SOME s)}; + if $"dir" = "on" then Pref.setDirectory you else Pref.unsetDirectory you - end + end; + + if not (iff $"discuss" = "on" then + Pref.subscribe ("hcoop-discuss", youremail) + else + Pref.unsubscribe ("hcoop-discuss", youremail)) then + %>