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/12 13:15:15 UTC
[12/17] 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/f0b67367
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f0b67367
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f0b67367
Branch: refs/heads/ib/7704
Commit: f0b6736741beb75f1c1a11926f576bafb0f3a9b3
Parents: 16d7f36
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Oct 15 11:31:40 2014 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Wed Nov 12 10:27:05 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/f0b67367/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)