|Project:||Chaos tool suite (ctools)|
When configuring a user view page using panels, selecting the fields from the profile2 entity joins the uid of the user profile page to the pid of the profile entity instead of the uid value.
For example: Say you have a user with id 4. And you have another user with uid 2. Each user has two profile entities associated to them.
uid 4 -> pid 3, pid 2
uid 2 -> pid 4, pid 1
When you load the panel user view using fields from the profile, user with uid 2 doesn't join on their own profiles. Instead loads the profile info from pid 2 (which belongs to uid 4) because the pids and uids are being mixed in the SQL.
I'll post a features export with an example setup to help debug.
The relationship between users and profiles seems to be generated using the foreign key relationship in he schema. So I'm not sure why/how the relationship is getting confused.