You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2014/10/15 12:56:20 UTC

[10/12] git commit: [#7704] ticket:662 Claim email only if option is set

[#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/1fdc928a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/1fdc928a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/1fdc928a

Branch: refs/heads/je/42cc_7704
Commit: 1fdc928a262b2cc998ab84d4cb8dc4c4eaf34b1b
Parents: 4e88deb
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Oct 15 11:31:40 2014 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Wed Oct 15 11:31:40 2014 +0300

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


http://git-wip-us.apache.org/repos/asf/allura/blob/1fdc928a/Allura/allura/controllers/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index d3a8475..39e728e 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)