Foren
how to create an organization during user registration?
ildar sl, geändert vor 7 Jahren.
how to create an organization during user registration?
Regular Member Beiträge: 158 Beitrittsdatum: 12.12.11 Neueste Beiträge
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, geändert vor 7 Jahren.
RE: how to create an organization during user registration?
Regular Member Beiträge: 158 Beitrittsdatum: 12.12.11 Neueste Beiträge
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);
}
}