coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: kjohn on December 24, 2007, 02:18:24 AM

Title: Profile viewable by non logged in users (guests)
Post by: kjohn on December 24, 2007, 02:18:24 AM
Perhaps I missed a related post, but I could not see where this issue has occurred for anyone else or perhaps it is my own ignorance.  User's profile information (specifically the custom profile fields) appear to be viewable by anyone without regard to log-in status.  First, is it supposed to be like this?  Second, is it possible for me to restrict these fields in some way?

I am running the latest version with Highslide, MiniCMS, Onlinestatus and require full name mods (which I extended to birthdate - all custom profile fields).

Any assistance is appreciated.
Title: Re: Profile viewable by non logged in users (guests)
Post by: Nibbler on December 24, 2007, 02:35:22 AM
Yes, that is intentional. If you want to hide them from anonymous users then you can mod profile.php.

find


$display_profile_form_param = array(
    array('text', 'username', $lang_register_php['username']),
    array('text', 'reg_date', $lang_register_php['reg_date']),
    array('text', 'group', $lang_register_php['group']),
    array('text', 'user_profile1', $CONFIG['user_profile1_name']),
    array('text', 'user_profile2', $CONFIG['user_profile2_name']),
    array('text', 'user_profile3', $CONFIG['user_profile3_name']),
    array('text', 'user_profile4', $CONFIG['user_profile4_name']),
    array('text', 'user_profile5', $CONFIG['user_profile5_name']),
    array('text', 'user_profile6', $CONFIG['user_profile6_name']),
    array('text', 'pic_count', $lang_register_php['pic_count']),
    array('thumb', 'user_thumb'),
    );


after that, add


if (!USER_ID) array_splice($display_profile_form_param, 3, 6);


To remove the additional profile fields.
Title: Re: Profile viewable by non logged in users (guests)
Post by: kjohn on December 24, 2007, 03:08:46 AM
Many thanks!

Now I understand; your suggestion works perfectly and I can pick and choose what fields are available for guests to see.
Title: Re: Profile viewable by non logged in users (guests)
Post by: dke on December 27, 2007, 06:47:05 PM
Thanks for the modification!