diff MoinMoin/macro/Login.py @ 483:a594780d5e64

Login macro, login/logout/UserPreferences actions imported from: moin--main--1.5--patch-487
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 19 Mar 2006 01:21:38 +0000
parents
children 2077ed6974d7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/macro/Login.py	Sun Mar 19 01:21:38 2006 +0000
@@ -0,0 +1,19 @@
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - login form
+
+    @copyright: 2005-2006 by Radomirs Cirskis <nad2000@gmail.com>
+    @license: GNU GPL, see COPYING for details.
+"""
+from MoinMoin.widget import html
+from MoinMoin import userform
+
+def execute(macro, args):
+    """ Show the login form (but only when not logged in) """
+    request = macro.request
+    if request.user.valid:
+        data = u''
+    else:
+        data = userform.getLogin(request)
+    return data
+