You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by md...@apache.org on 2017/09/22 21:52:25 UTC
usergrid git commit: add reset_url as field in admin confirmation
email
Repository: usergrid
Updated Branches:
refs/heads/hotfix-20170922 436cb8046 -> 9f015fe0a
add reset_url as field in admin confirmation email
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/9f015fe0
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/9f015fe0
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/9f015fe0
Branch: refs/heads/hotfix-20170922
Commit: 9f015fe0add8a08e934e94190dac5d0e8451fb5f
Parents: 436cb80
Author: Mike Dunker <md...@google.com>
Authored: Fri Sep 22 14:51:55 2017 -0700
Committer: Mike Dunker <md...@google.com>
Committed: Fri Sep 22 14:51:55 2017 -0700
----------------------------------------------------------------------
.../management/cassandra/ManagementServiceImpl.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/9f015fe0/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 876cd5b..fd85f1c 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -2654,8 +2654,15 @@ public class ManagementServiceImpl implements ManagementService {
getOrganizationConfigByUuid(organizationId) : getOrganizationConfigForUserInfo(user);
String confirmation_url = orgConfig.getFullUrl(WorkflowUrl.ADMIN_CONFIRMATION_URL, user.getUuid().toString()) +
"?token=" + token;
+
+ String reset_token = getPasswordResetTokenForAdminUser( user.getUuid(), 0, organizationId );
+ String resetPropertyUrl = orgConfig.getFullUrlTemplate(WorkflowUrl.ADMIN_RESETPW_URL);
+ String reset_url = String.format(resetPropertyUrl, user.getUuid().toString())
+ + "?token=" + reset_token;
+
sendAdminUserEmail(user, "User Account Confirmation: " + user.getEmail(),
- emailMsg(hashMap("confirm_email", user.getEmail()).map("confirmation_url", confirmation_url),
+ emailMsg(hashMap("confirm_email", user.getEmail()).map("confirmation_url", confirmation_url)
+ .map("reset_url", reset_url),
PROPERTIES_EMAIL_ADMIN_CONFIRMATION));
}