Muliple profile support fails for new users


Multiple profiles appear not to be properly supported for new users. Users created through data.xml appear to have all the information necessary to properly support multiple profiles, but users later created automatically by the uPortal code do not (for example, an LDAP user not in data.xml).

When a user first logs into the portal, the code copies the appropriate number of profiles from the default user. From looking at the code, I believe the following logic occurs the first time a user makes a layout change:

1. Check UP_LAYOUT for a layout id which matches the current user and profile id.
2. If none is found, set the expected layout id to "1".
3. Try to get the layout from the table. If none is found, add one with the expected id.


1. If the user has multiple profiles, the layout will be assumed to be "1", even if layout "1" has already been created for another profile for that user. In this case, another one wouldn't be inserted, but the profile would be configured to use this already-existing layout.
2. The layout id in UP_USER_PROFILE is set when the layout is created, but the structure and theme ids are never updated from null. I have no idea why, or what the consequences of having a null structure and theme id is. It seems to only cause problems when a user has multiple profiles. I can add code to look up the structure and theme ids for the profile for the default user.
3. Profile IDs seem to currently have a particular meaning and be expected to be the same across all users and profiles. For example, if for the default user, profile 2 is intended to be the mobile profile, profile 2 is expected to be the mobile profile for all users. This situation isn't particularly compatible with import/export, and I'm not sure what the best way to handle it is. It seems like we could use the name of the profile to find profiles rather than the id, or perhaps create a new column in UP_USER_PROFILE that would be an identifier for each profile that would be unique per user and consistent across users. Layout IDs are also mapped in a similar problematic fashion.
4. Profiles are only created when the user is first created. This means that if a profile is added to the template user after a user has already been created, he or she will never get the new profile.

Proposal: To fix this code, as well as prepare for supporting multiple profiles and user agent mappings in the import/export tools, I'm proposing that we amend the existing code to identify and create users profiles using the profile name and layout names as handles, rather than profile and layout IDs.




Jen Bourey
October 6, 2009, 4:30 AM

I believe this issue is now resolved in the main java code. We still need to finish making import/export compatible with these changes ().



Jen Bourey


Jen Bourey



Estimated End Date



Fix versions