changeset 2295:66cc37b8f297

recoverpass: give message about no mail right away
author Johannes Berg <johannes AT sipsolutions DOT net>
date Tue, 10 Jul 2007 17:20:29 +0200
parents 22749e92a461
children f22518801de4 7dd064111811 2b4ae7c40bfa
files MoinMoin/action/recoverpass.py
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/recoverpass.py	Tue Jul 10 17:04:55 2007 +0200
+++ b/MoinMoin/action/recoverpass.py	Tue Jul 10 17:20:29 2007 +0200
@@ -47,16 +47,21 @@
 
         request.write(request.formatter.startContent("content"))
 
-        # THIS IS A BIG HACK. IT NEEDS TO BE CLEANED UP
-        request.write(Settings(request).create_form(recover_only=True))
+        if not request.cfg.mail_enabled:
+            request.write(_("""This wiki is not enabled for mail processing.
+Contact the owner of the wiki, who can enable email."""))
+        else:
+            # THIS IS A BIG HACK. IT NEEDS TO BE CLEANED UP
+            request.write(Settings(request).create_form(recover_only=True))
 
-        request.write(_("""
+            request.write(_("""
 == Recovering a lost password ==
 [[BR]]
 If you have forgotten your password, provide your email address and click on '''Mail me my account data'''.
 [[BR]]
 The email you get contains the encrypted password (so even if someone intercepts the mail, he won't know your REAL password). Just copy and paste it into the login mask into the password field and log in.
 After logging in you should change your password."""))
+
         request.write(request.formatter.endContent())
 
         request.theme.send_footer(pagename)