Skip to content

Commit

Permalink
Fixed user validation/password reset
Browse files Browse the repository at this point in the history
  • Loading branch information
rubendel committed Aug 18, 2015
1 parent 3309b58 commit 468b465
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void execute() throws UserException {
context.put("name", user.getName());
context.put("username", user.getUsername());
context.put("siteaddress", serverSettings.getSiteAddress());
context.put("validationlink", resetUrl + "&username=" + user.getUsername() + "&uoid=" + user.getOid() + "&token=" + token + "&address=" + bimServer.getServerSettingsCache().getServerSettings().getSiteAddress());
context.put("validationlink", resetUrl + "&username=" + user.getUsername() + "&uoid=" + user.getOid() + "&validationtoken=" + token + "&address=" + bimServer.getServerSettingsCache().getServerSettings().getSiteAddress());
String subject = null;
if (selfRegistration) {
body = bimServer.getTemplateEngine().process(context, TemplateIdentifier.SELF_REGISTRATION_EMAIL_BODY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void execute() throws UserException {
context.put("name", user.getName());
context.put("username", user.getUsername());
context.put("siteaddress", bimServer.getServerSettingsCache().getServerSettings().getSiteAddress());
context.put("validationlink", resetUrl + "&username=" + user.getUsername() + "&uoid=" + user.getOid() + "&token=" + token + "&address=" + bimServer.getServerSettingsCache().getServerSettings().getSiteAddress());
context.put("validationlink", resetUrl + "&username=" + user.getUsername() + "&uoid=" + user.getOid() + "&validationtoken=" + token + "&address=" + bimServer.getServerSettingsCache().getServerSettings().getSiteAddress());
body = bimServer.getTemplateEngine().process(context, TemplateIdentifier.PASSWORD_RESET_EMAIL_BODY);
subject = bimServer.getTemplateEngine().process(context, TemplateIdentifier.PASSWORD_RESET_EMAIL_SUBJECT);
message.setContent(body, "text/html");
Expand Down
5 changes: 3 additions & 2 deletions BimServer/www/js/bimserverapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function BimServerApi(baseUrl, notifier) {
SETDEFAULTMODELCOMPARE_DONE: "Default Model Compare successfully changed",
LOGIN_BUSY: "Trying to login",
CHANGEUSERTYPE_DONE: "Type of user successfully changed",
ADDUSER_DONE: "User successfully added",
ADDUSER_DONE: "User successfully added, you should receive a validation email shortly",
UPDATEINTERNALSERVICE_DONE: "Internal service successfully updated",
UPDATEMODELCOMPARE_DONE: "Model compare plugin successfully updated",
UPDATEMODELMERGER_DONE: "Model merger successfully updated",
Expand Down Expand Up @@ -71,7 +71,8 @@ function BimServerApi(baseUrl, notifier) {
GETPLUGINDESCRIPTOR_BUSY: "Getting plugin information",
GETUSERSETTINGS_BUSY: "Getting user settings",
GETALLQUERYENGINES_BUSY: "Getting query engines",
REGISTERNEWPROJECTHANDLER_BUSY: "Registering for updates on new projects"
REGISTERNEWPROJECTHANDLER_BUSY: "Registering for updates on new projects",
ADDUSER_BUSY: "Adding user..."
}

othis.token = null;
Expand Down

0 comments on commit 468b465

Please sign in to comment.