allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject [2/3] allura git commit: [#8013] checked the development.ini for reuire_email_addr.
Date Thu, 17 Dec 2015 22:54:42 GMT
[#8013] checked the development.ini for reuire_email_addr.


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

Branch: refs/heads/master
Commit: a566641a37b13b15eb6a230cd650aa27b8112e6e
Parents: aac897e
Author: dastanforever <pranav.sharma.nits@gmail.com>
Authored: Fri Dec 11 19:44:38 2015 +0530
Committer: Heith Seewald <heiths@gmail.com>
Committed: Thu Dec 17 16:53:23 2015 -0600

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


http://git-wip-us.apache.org/repos/asf/allura/blob/a566641a/Allura/allura/controllers/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index 948f223..e7492b2 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -230,12 +230,14 @@ class AuthController(BaseController):
         if not asbool(config.get('auth.allow_user_registration', True)):
             raise wexc.HTTPNotFound()
         require_email = asbool(config.get('auth.require_email_addr', False))
+        make_project = not require_email
         user = M.User.register(
             dict(username=username,
                  display_name=display_name,
                  password=pw,
-                 pending=require_email),make_project=False)
-        user.set_tool_data('allura', pwd_reset_preserve_session=session.id)  # else the first
password set causes this session to be invalidated
+                 pending=require_email), make_project)
+        user.set_tool_data('allura', pwd_reset_preserve_session=session.id)
+        # else the first password set causes this session to be invalidated
         if require_email:
             em = user.claim_address(email)
             if em:
@@ -277,8 +279,7 @@ class AuthController(BaseController):
                 plugin.AuthenticationProvider.get(request).activate_user(user)
                 projectname = plugin.AuthenticationProvider.get(request).user_project_shortname(user)
                 n = M.Neighborhood.query.get(name='Users')
-                n.register_project(projectname,
-                               user=user, user_project=True)
+                n.register_project(projectname, user=user, user_project=True)
         else:
             flash('Unknown verification link', 'error')
 


Mime
View raw message