You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/02/05 18:32:14 UTC
[3/5] allura git commit: [#8032] Default email id's created and
confirmed.
[#8032] Default email id's created and confirmed.
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/9caa879e
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/9caa879e
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/9caa879e
Branch: refs/heads/master
Commit: 9caa879e77de6b60a07fcd0040ba94e410612f81
Parents: 7336d14
Author: dastanforever <pr...@gmail.com>
Authored: Fri Dec 18 12:30:49 2015 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Feb 5 12:22:44 2016 -0500
----------------------------------------------------------------------
Allura/allura/websetup/bootstrap.py | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/9caa879e/Allura/allura/websetup/bootstrap.py
----------------------------------------------------------------------
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index 8bc04fe..111b4e3 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -338,6 +338,12 @@ def create_user(display_name, username=None, password='foo', make_project=False)
user = M.User.register(dict(username=username,
display_name=display_name),
make_project=make_project)
+ email = username+"@allura.local"
+ user.claim_address(email)
+ from allura.model.auth import EmailAddress
+ kw = {"email": email}
+ em = EmailAddress.get(**kw)
+ em.confirmed = True
user.set_password(password)
return user