留言板
how to create an organization during user registration?
ildar sl,修改在7 年前。
how to create an organization during user registration?
Regular Member 帖子: 158 加入日期: 11-12-12 最近的帖子
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,修改在7 年前。
RE: how to create an organization during user registration?
Regular Member 帖子: 158 加入日期: 11-12-12 最近的帖子
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);
}
}