changeset 3497:2d257a89548d

Ignore empty emails if `email' is present in user_form_remove.
author Federico G. Schwindt <fgsch@lodoss.net>
date Fri, 11 Apr 2008 13:52:28 +0100
parents ac14bdd08549
children 1c113184a79b
files MoinMoin/action/newaccount.py MoinMoin/userprefs/prefs.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/newaccount.py	Sat Apr 12 17:40:35 2008 +0200
+++ b/MoinMoin/action/newaccount.py	Fri Apr 11 13:52:28 2008 +0100
@@ -70,7 +70,7 @@
     # try to get the email, for new users it is required
     email = wikiutil.clean_input(form.get('email', [''])[0])
     theuser.email = email.strip()
-    if not theuser.email:
+    if not theuser.email and 'email' not in request.cfg.user_form_remove:
         return _("Please provide your email address. If you lose your"
                  " login information, you can get it by email.")
 
--- a/MoinMoin/userprefs/prefs.py	Sat Apr 12 17:40:35 2008 +0200
+++ b/MoinMoin/userprefs/prefs.py	Fri Apr 11 13:52:28 2008 +0100
@@ -92,7 +92,7 @@
             theuser.email = email.strip()
 
             # Require email
-            if not theuser.email:
+            if not theuser.email and 'email' not in self.request.cfg.user_form_remove:
                 return _("Please provide your email address. If you lose your"
                          " login information, you can get it by email.")