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/11/19 15:01:24 UTC
[13/26] allura 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/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/ib/7794
Commit: d99f238f6759d65c5ef30788fa92084644b121d5
Parents: 3095f42
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Oct 15 11:31:40 2014 +0300
Committer: Dave Brondsema <db...@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)