|
|
|
@ -238,12 +238,16 @@ public class CreateUsersImpl extends RemoteServiceServlet implements HandleUsers
|
|
|
|
|
logger.info("Create workspace via shub has been done, proceed with user add to VRE");
|
|
|
|
|
// adding to the current VRE
|
|
|
|
|
long userId = userManager.getUserId(user.getScreenName());
|
|
|
|
|
userManager.assignUserToGroup(getCurrentGroupID(), userId);
|
|
|
|
|
logger.debug("trying to send the event to create the account for this user to the orchestrator");
|
|
|
|
|
logger.info("trying to send the event to create the account for this user to the orchestrator");
|
|
|
|
|
long currGroupId = pContext.getCurrentGroupId(getThreadLocalRequest());
|
|
|
|
|
Group theVRE = GroupLocalServiceUtil.getGroup(currGroupId);
|
|
|
|
|
new CreateUserAddToVrePublisher().publish(
|
|
|
|
|
CreateUserAddToVre.newEvent(user.getScreenName(), name, surname, email, INITIAL_PWD, theVRE));
|
|
|
|
|
logger.debug("... sleeping 5 seconds");
|
|
|
|
|
Thread.sleep(5000);
|
|
|
|
|
logger.debug("... now adding his user to the VRE");
|
|
|
|
|
userManager.assignUserToGroup(getCurrentGroupID(), userId);
|
|
|
|
|
|
|
|
|
|
if (sendEmail)
|
|
|
|
|
sendEmailToUser(email, name + " " + surname);
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|