changeset 205:9f13a34ac698

tell if user account is disabled imported from: moin--main--1.5--patch-207
author Thomas Waldmann <tw@waldmann-edv.de>
date Fri, 11 Nov 2005 22:05:11 +0000
parents 472de4788235
children 56b792616c8d
files MoinMoin/userform.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/userform.py	Thu Nov 10 13:23:40 2005 +0000
+++ b/MoinMoin/userform.py	Fri Nov 11 22:05:11 2005 +0000
@@ -114,8 +114,11 @@
             # Load the user data and check for validness
             theuser = user.User(self.request, name=name, password=password)
             if not theuser.valid:
-                return _("Sorry, wrong password.")
-            
+                if theuser.disabled:
+                    return _('Account "%s" is disabled.') % name
+                else:
+                    return _("Sorry, wrong password.")
+
             # Save the user and send a cookie
             self.request.user = theuser
             self.request.setCookie()