Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Niccolò Seri
Modify built-in registration portlet
September 26, 2012 2:04 AM
Answer

Niccolò Seri

Rank: New Member

Posts: 11

Join Date: September 26, 2012

Recent Posts

Hello,
we need to modify the portlet registration by adding the list of organizations added to the portal. The user selects an element and, according to this choice, the suffix e-mail address is automatically generated. Upon confirmation of registration, the new user is associated with the organization he selected. The question is about how to do this last step: how to extend the portlet so that also performs an insert on the association table between organizations and users?

thanks
Apoorva Prakash
RE: Modify built-in registration portlet
September 28, 2012 8:17 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Hello Seri,

Seems like you have already customized login action class in ext.

The following code will update the user for assigning the organization also:

1Organization organization = OrganizationLocalServiceUtil.getOrganization(themeDisplay.getCompanyId(), "orgName");
2organizationIds[0] = organization.getOrganizationId();
3UserLocalServiceUtil.updateOrganizations(user.getUserId(), organizationIds);


Hope this will help.

Thanks and Regards,
Apoorva Prakash
Niccolò Seri
RE: Modify built-in registration portlet
September 28, 2012 8:30 AM
Answer

Niccolò Seri

Rank: New Member

Posts: 11

Join Date: September 26, 2012

Recent Posts

Hello Prakash,
I already solved my problem using hook, but thank you anyway for you reply.

Bye
Apoorva Prakash
RE: Modify built-in registration portlet
September 29, 2012 12:21 PM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Thats Great Seri.. emoticon