Author: ghjboss
Date: 2011-08-15 15:47:38 -0400 (Mon, 15 Aug 2011)
New Revision: 7135
Modified:
epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm/CustomMembershipLoginModule.java
Log:
fix for JBEPP-1071
Modified:
epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm/CustomMembershipLoginModule.java
===================================================================
---
epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm/CustomMembershipLoginModule.java 2011-08-15
19:35:05 UTC (rev 7134)
+++
epp/portal/branches/EPP_5_1_0_GA_JBEPP-1071/component/identity/src/main/java/org/exoplatform/services/organization/idm/CustomMembershipLoginModule.java 2011-08-15
19:47:38 UTC (rev 7135)
@@ -146,15 +146,15 @@
*/
private void addUserToPlatformUsers(String userId) throws Exception
{
+ OrganizationService orgService = null;
try
{
- OrganizationService orgService =
(OrganizationService)getContainer().getComponentInstanceOfType(OrganizationService.class);
+ orgService =
(OrganizationService)getContainer().getComponentInstanceOfType(OrganizationService.class);
begin(orgService);
User user = orgService.getUserHandler().findUserByName(userId);
MembershipType memberType =
orgService.getMembershipTypeHandler().findMembershipType(membershipType);
Group platformUsersGroup = orgService.getGroupHandler().findGroupById(groupId);
- orgService.getMembershipHandler().linkMembership(user, platformUsersGroup,
memberType, true);
- end(orgService);
+ orgService.getMembershipHandler().linkMembership(user, platformUsersGroup,
memberType, true);
}
catch (Exception e)
{
@@ -162,6 +162,10 @@
// don't rethrow login exception in case of failure.
// throw e;
}
+ finally
+ {
+ end(orgService);
+ }
}
private void begin(OrganizationService orgService) throws Exception
{
Show replies by date