allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [10/15] allura git commit: [#7704] ticket:662 Claim email only if option is set
Date Mon, 17 Nov 2014 19:43:16 GMT
[#7704] ticket:662 Claim email only if option is set


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d99f238f
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d99f238f
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d99f238f

Branch: refs/heads/master
Commit: d99f238f6759d65c5ef30788fa92084644b121d5
Parents: 3095f42
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Oct 15 11:31:40 2014 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Nov 17 19:18:04 2014 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/auth.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/d99f238f/Allura/allura/controllers/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index 4076b14..875ebeb 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -223,13 +223,14 @@ class AuthController(BaseController):
     def save_new(self, display_name=None, username=None, pw=None, email=None, **kw):
         if not asbool(config.get('auth.allow_user_registration', True)):
             raise wexc.HTTPNotFound()
+        require_email = asbool(config.get('auth.require_email_addr', False))
         user = M.User.register(
             dict(username=username,
                  display_name=display_name,
                  password=pw,
-                 pending=asbool(config.get('auth.require_email_addr', False))))
+                 pending=require_email))
         plugin.AuthenticationProvider.get(request).login(user)
-        if email is not None:
+        if require_email:
             em = user.claim_address(email)
             em.send_verification_link()
         flash('User "%s" registered' % username)


Mime
View raw message