Fórum
how to create an organization during user registration?
ildar sl, modificado 7 Anos atrás.
how to create an organization during user registration?
Regular Member Postagens: 158 Data de Entrada: 12/12/11 Postagens Recentes
I'm use 6.2 ga6.
Metod updateOrganization(actionRequest) - a full copy of the com.liferay.portlet.usersadmin.action.EditOrganizationAction.
The question is how to get the number we just created? And to make it an administrator to new organization?
public class CustomCreateAccountAction extends BaseStrutsPortletAction {
public void processAction(
StrutsPortletAction originalStrutsPortletAction,
PortletConfig portletConfig, ActionRequest actionRequest,
ActionResponse actionResponse)
throws Exception {
originalStrutsPortletAction.processAction(
originalStrutsPortletAction, portletConfig, actionRequest,
actionResponse);
updateOrganization(actionRequest);
}
Metod updateOrganization(actionRequest) - a full copy of the com.liferay.portlet.usersadmin.action.EditOrganizationAction.
The question is how to get the number we just created? And to make it an administrator to new organization?
ildar sl, modificado 7 Anos atrás.
RE: how to create an organization during user registration?
Regular Member Postagens: 158 Data de Entrada: 12/12/11 Postagens Recentes
ok, solved
public void processAction(
StrutsPortletAction originalStrutsPortletAction,
PortletConfig portletConfig, ActionRequest actionRequest,
ActionResponse actionResponse)
throws Exception {
String emailid=ParamUtil.getString(actionRequest, "emailAddress");
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
originalStrutsPortletAction.processAction(
originalStrutsPortletAction, portletConfig, actionRequest,
actionResponse);
if (SessionErrors.isEmpty(actionRequest)){
long newlyCreatedUserId=UserLocalServiceUtil.getUserIdByEmailAddress(themeDisplay.getCompanyId(), emailid);
updateOrganization(actionRequest, newlyCreatedUserId);
}
}