Is there an easy way to discover who owns a secondary profile?

researchcooperative
@researchcooperative
8 years ago
694 posts
Here I will use the phrases "primary profile" and "secondary profile" to distinguish the profile established when a new user creates an account (primary profile) and further profiles established by the owner of an account (secondary profiles).

Admin can distinguish secondary profiles when searching the profile browser in ACP. In the profile browser, secondary profiles are the ones for which the "User account" and "User email" columns are empty.

Admin can also see all primary profiles by looking at User Accounts in the ACP, and clicking on the Modify buttons.

I cannot find any way for Admin to discover the owner of a secondary profile, in the Admin panels, or in the public view.

Visitors to the site are also not able to see who is the owner of a secondary profile; they can only see whatever is provided in the public profile data (in my network, profile data is published in the profile sidebar, so that people can know something about other members of the network).

Is there an easy way, for Admin, and for a site visitor, to discover who owns a secondary profile?

And is there an easy way for profiles to be marked as primary or secondary in the public (top) page of a profile, for everyone to see?



--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)

updated by @researchcooperative: 01/27/17 03:24:21PM
researchcooperative
@researchcooperative
8 years ago
694 posts
Here is a screen grab showing the settings page of a profile for which now account information is associated.

Is the menu, with no account tab, what we should expect to see when a secondary profile is created?


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)
michael
@michael
8 years ago
7,715 posts
You can put anything you like onto profile pages, perhaps the profile_header.tpl file. It will contain the $_profile variable with everything related to that profile in it.

'Profiles' are associated with 'User' accounts not other profiles, so what you're going to want to do is get the user_id of the owner of the profile, then use that in a {jrCore_list} call as a search parameter

something like:
{jrCore_list module="jrProfile" search="_user_id = $_user_id"}
(you'll need to use the actual variable that contains the user_id $_user_id is just one put there to illustrate how to do it. use {debug} to find out what variables you have available.)

Then you can format it however you like.

Docs: "{debug}"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/1477/debug

Docs: "{jrCore_list}"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/89/jrcore-list
michael
@michael
8 years ago
7,715 posts
Something like this:
{capture assign="profile_tpl"}
{literal}
    {if isset($_items)}
    {foreach $_items  as $item}
    <a href="{$jamroom_url}/{$item.profile_url}">{jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_image" item_id=$item._profile_id size="small" crop="auto" alt=$item.profile_name title=$item.profile_name width=false height=false}</a><br>
    <a href="{$jamroom_url}/{$item.profile_url}">{$item.profile_name}</a><br>
    {/foreach}
    {/if}
{/literal}
{/capture}
{jrCore_list module="jrProfile" search="_user_id = `$_user_id`" template=$profile_tpl}
put in the profile_header.tpl will show the profile images with their names of all profiles linked to the currently viewed profile.
researchcooperative
@researchcooperative
8 years ago
694 posts
Thanks.

I tried this, and it showed linked profiles as stated. In the case of my master Admin profile, I could see that Master Admin is the account holder, and none of the secondary profiles revealed account details, as expected.

I then looked at my leaderless Testuser One profile and found two associated profiles that are equally leaderless, with no account holder shown (though it must have been me, ultimately, several months ago).

I am leaving the modified template in my cloned skin, deactivated, as a possibly-useful tool for the future.

Meanwhile, I need to figure out how I created three profiles that are not associated with any account.

If we delete the profile and account of a user account holder, will secondary profiles created by that user remain in the system?

Perhaps I have these leaderless profiles for a reason like this.

This is not an urgent matter, but I do want to understand how to manage the profile system, in order to explain it better to my members eventually.


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)

updated by @researchcooperative: 10/27/16 10:44:31PM
researchcooperative
@researchcooperative
8 years ago
694 posts
When the quota of a user is changed from one that allows multiple profiles to one that does not, do secondary profiles that were made previously remain in the system as unowned, leaderless profiles?


--
PJ Matthews, Kyoto
Migrated from Ning 2.0. Now at Jamroom 6 beta and using Jamroom Hosting for The Research Cooperative (researchcooperative.org)
michael
@michael
8 years ago
7,715 posts
In order for a user to have more than one profile, the admin user must link them to that profile or they have the "Power User" setting for the quota that they are in that allows them to create new profiles.

If they are in a quota that has "Power User" enabled and they choose to create 3 new profiles, then they are removed from the power user quota, they will still have their profiles.