Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.0 CE GA1, 6.1.10 EE GA1, 6.2.0 CE M2
-
Fix Version/s: 6.1.10 EE GA1, 6.1.20 EE GA2, --Sprint 11/12, 6.2.0 CE M2
-
Component/s: API, API > Portal Service
-
Labels:
-
Environment:Tomcat 7 + MySQL 5. 6.1.x
-
Branch Version/s:6.1.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Added to Fix Pack:Added
-
Similar Issues:
Description
Download and install Liferay 6.1 CE GA 1
Run Liferay
Login as test@liferay.com
Go to Control panel / Sites
Create new site called 'myCompany' with the Membership Type restricted
Go to Control panel / Portal Settings / General
Update Main Configuration / Name with the same name: 'myCompany' and save you changes
Go to Portal Settings / Users and Organizations / Default User Associations
Update Sites with 'myCompany' and save you changes
Go to Users and Organizations and create a new user
After you have created the user go to users detail page go to Sites tab
User has now one site myCompany which is the default guest site "community" instead of the site you have created.
This happens because in Liferay 6.1 you have changed the code in UserLocalServiceImpl.addDefaultGroups :
UserLocalServiceImpl.addDefaultGroups(long userId)
Company company = companyPersistence.findByPrimaryKey(
user.getCompanyId());
Account account = company.getAccount();
if (defaultGroupName.equalsIgnoreCase(account.getName()))
{ defaultGroupName = GroupConstants.GUEST; }Company company = companyPersistence.findByPrimaryKey(
user.getCompanyId());
Account account = company.getAccount();
if (defaultGroupName.equalsIgnoreCase(account.getName())) { defaultGroupName = GroupConstants.GUEST; }
The issue accrues because of the following check:
if (defaultGroupName.equalsIgnoreCase(account.getName()))
Fix:
Please make this check configurable.

Alireza,
Thank you for your report. As part of the community verifier program I am taking a look at this issue. In the meantime, if you have any other information about this issue please add a comment to let me know.
Thanks!