Dear " + username + ",
" + "
" +
- "Welcome! You recently created an account at " + portalUrl + ". Your password is not sent by email for security purposes.
" +
+ "Welcome! Your new account at " + portalUrl + " is ready to be used. Your temporary password is training1, you will be asked to reset it at your first login.
" +
"
" + "Sincerely,
" +
gatewayName + "
" +
emailSender + "
" + portalUrl;
- String subject = portalUrl + ": Your New Account was created successfully!";
+ String subject = gatewayName + ": Your New Account was created successfully!";
mailMessage.setBody(body);
mailMessage.setSubject(subject);
@@ -328,15 +326,14 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
isMale,
null,
null,
- sendEmail, // determine if we need to send him/her an email
+ false, // determine if we need to send him/her an email
true); // force the password reset
// adding to the current VRE
userManager.assignUserToGroup(getCurrentGroupID(), userManager.getUserId(user.getUsername()));
-
- //adding to the HL
- addUserToHLGroup(user.getUsername(), session.getScope());
-
+ if (sendEmail)
+ sendEmailToUser(email);
+
}catch(Exception e){
// unable to create.. we need to delete it from the list of users
@@ -500,20 +497,6 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
return false;
}
- /**
- * Add user to Home Library Group
- * @param username
- * @param group
- */
- private void addUserToHLGroup(String username, String group) {
- try {
- org.gcube.common.homelibrary.home.workspace.usermanager.UserManager um = HomeLibrary.getHomeManagerFactory().getUserManager();
- um.associateUserToGroup(group, username);
- } catch (Exception e) {
- logger.error("Failed to get the usermanager from HL. Could not add user to the HL group");
- }
- }
-
/**
* Get the current group ID
*