Custom profile elements not visible to Admin account

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
4/5/2012 10:41:34 AM
Gravatar
Total Posts 104

Custom profile elements not visible to Admin account

I have set up some additional profile elements, and I want to limit the access to change them to just Administrators and Role Administrators...

  <add name="Credentials"     type="System.String"     allowMarkup="false"           resourceFile="ProfileResource"     labelResourceKey="Staff Member Credentials"     lazyLoad="false"     requiredForRegistration="false"     allowAnonymous="false"     visibleToAnonymous="true"     visibleToAuthenticated="true"     visibleToUser="true"     editableByUser="true"     regexValidationExpression=""     regexValidationErrorResourceKey=""     maxLength="100"           cssClass="widetextbox"     onlyAvailableForRoles="Administrators;Role Administrators"     onlyVisibleForRoles=""     includeHelpLink="true"       />

...the problem is that when I set the value in "onlyAvailableForRoles", the main Admin account (myself) cannot see these anymore...

4/5/2012 10:58:45 AM
Gravatar
Total Posts 2254

Re: Custom profile elements not visible to Admin account

Use:

onlyAvailableForRoles="Admins;Role Admins;"

HTH,
Joe D.

4/5/2012 11:05:27 AM
Gravatar
Total Posts 18439

Re: Custom profile elements not visible to Admin account

Put

Admins;Role Administrators

Roles have both a role name and a display name, the Administrators role name is Admins, though I know that is a little confusing it can't be changed for historical reasons. The display name of roles can be edited but the role name cannot.

Note that onlyAvailableForRoles means this property is only available on users who are members of those roles, ie it won't be a property on users who are not in those roles. 

Hope that helps,

Joe

4/5/2012 11:13:28 AM
Gravatar
Total Posts 104

Re: Custom profile elements not visible to Admin account

Thank you for your response Joe!  : )  I have tried a number of different combinations and nothing seems to be working.

At first, I thought it was the difference between "Admins" and what is set up under "Role Administration" on the main site, which now reads "Administrators", of which I am a member ("Admin").  But I have tried "Admins", "Admins;Administrators;" and just "Administrators" for onlyAvailableForRoles, and nothing seems to make this visible to just my account ("Admin").

I guess I'm also not clear on the difference between onlyAvailableForRoles and onlyVisibleForRoles.

I also tried to create a new member/user and I still cannot get these items to show.

Does one have to restart the server or something after making custom changes to a mojoProfile.config file?  I have tried to go into the Web.config file and make a change, thinking that might do something, but this doesn't seem to make any difference either...

What I am trying to do is set up custom profile items that are only available and/or visible to Administrators and Role Administrators to set up, but I would also want them to be displayed in any member list on the site.

I do appreciate any direction you might be able to provide...  : )  Thanks again!

4/5/2012 11:18:58 AM
Gravatar
Total Posts 104

Re: Custom profile elements not visible to Admin account

I went back to the main site and changed the display name back to "Admins" (Administration Menu >Role Administration), then updated my custom profile file on the secondary site, mojoCustomProfile.config and set it to onlyAvailableForRoles="Admins;Role Administrators", but the profile item is still not visible.  Is there something that perhaps I need to reset somewhere?

Thanks again Joe and Joe! : )

4/5/2012 11:20:09 AM
Gravatar
Total Posts 104

Re: Custom profile elements not visible to Admin account

ah ha!  I think I understand what you're saying now Joe A. : )

4/5/2012 11:23:02 AM
Gravatar
Total Posts 104

Re: Custom profile elements not visible to Admin account

hmmm.... changed two lines to

    onlyAvailableForRoles="Staff Members"     onlyVisibleForRoles="Admins;Role Administrators"

the profile belongs to the role "Staff Members", and my account is a member of "Admins", but I still can't see the profile item...

4/5/2012 11:51:52 AM
Gravatar
Total Posts 18439

Re: Custom profile elements not visible to Admin account

should be:

onlyVisibleForRoles="Admins;Role Admins"

as Joe D pointed out.

Look in the database in the mp_Roles table and make sure your RoleName there is what you think it is ie "Staff Members", if it matches the rolename in the database it should work, I just tested it here and it works for me.

Hope that helps,

Joe

4/5/2012 1:30:00 PM
Gravatar
Total Posts 18439

Re: Custom profile elements not visible to Admin account

fyi, I implemented support for CheckboxList questions in user profile today. It is in the source code repository now so it will be in the next release. There is an example in comments in mojoProfile.config

Best,

Joe

4/5/2012 3:38:27 PM
Gravatar
Total Posts 104

Re: Custom profile elements not visible to Admin account

Hey thanks! : )  That's speedy!

It looks like I somehow have 3 "Admin" accounts in the database.  I don't suppose you have an UPDATE/JOIN statement you might have used for this kind of thing before do you... ? :D

 

4/5/2012 3:55:56 PM
Gravatar
Total Posts 104

Re: Custom profile elements not visible to Admin account

ah - nevermind - It's probably because I have three sites lol

You must sign in to post in the forums. This thread is closed to new posts.