create a "generic" profile without permission to change the user profile create a "generic" profile without permission to change the user profile
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

create a "generic" profile without permission to change the user profile

Started by philippefx, August 13, 2010, 11:13:12 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

philippefx

Hi,

We have "guest"-like profile for a group of people. We don't want them to change the password, name, etc.

And we also would like to suppress the sidebar menu for this guest.

What's the best way to do this ?


Thank you,

Philippe

papukaija

Quote from: philippefx on August 13, 2010, 11:13:12 AM
We have "guest"-like profile for a group of people. We don't want them to change the password, name, etc.
Please look at group manager (groupmgr.php).

Quote from: philippefx on August 13, 2010, 11:13:12 AM
And we also would like to suppress the sidebar menu for this guest.
Board rules / Forum policies: One Question per Thread This rule is very strict. Btw, the answer to this question can be found from the docs.

philippefx


Quote from: papukaija on August 15, 2010, 09:52:42 PM
Please look at group manager (groupmgr.php).

So an answer could be "It can't be done with a config setting and you have to edit/change the code" ?


Quote from: papukaija on August 15, 2010, 09:52:42 PM
Board rules / Forum policies: One Question per Thread This rule is very strict. Btw, the answer to this question can be found from the docs.

It was the same question/subject for me, "permission to change the user profile", I didn't know this is a separate settings. Sorry.

Anyway thanks for your answer, I found the solution (admin menu -> theme).


Greetings,
Philippe



papukaija

Quote from: philippefx on August 16, 2010, 11:45:37 AM
So an answer could be "It can't be done with a config setting and you have to edit/change the code" ?

No, but I'll explain what I meant if you post a link to your gallery as requested by board rules (don't expect clear answers,or answers at all, if you don't follow board rules). Btw, groupmgr.php isn't the only place to control user's permissions.

philippefx

Quote from: papukaija on August 16, 2010, 05:35:14 PM
No, but I'll explain what I meant if you post a link to your gallery as requested by board rules (don't expect clear answers,or answers at all, if you don't follow board rules). Btw, groupmgr.php isn't the only place to control user's permissions.

Yes it's my gallery : http://photo.grangeneuve.ch/,

You may try this user / passwd : test / testforum


Thank you.

papukaija

Ok, there are few places where you can control guest's permissions (login to your gallery as admin first):

- For global group permions, go to http://photo.grangeneuve.ch/groupmgr.php
- To controll registration and things that users can do with their profile,etc : http://photo.grangeneuve.ch/admin.php
- There are also album specific settings; a "properties" link is at the front page, near the album's name.

philippefx

Quote from: papukaija on August 17, 2010, 10:06:20 PM
Ok, there are few places where you can control guest's permissions (login to your gallery as admin first):

- For global group permions, go to http://photo.grangeneuve.ch/groupmgr.php
- To controll registration and things that users can do with their profile,etc : http://photo.grangeneuve.ch/admin.php
- There are also album specific settings; a "properties" link is at the front page, near the album's name.

Thank you for your answer, but you didn't read the question did you ? Or I didn't understand your answer. I already checked all options and no one can help me, or I missed something.

If I create any account, the user *can* change his own password. I would like to avoid this. How can I do that ?


Thanks for any help,

Nibbler

You can only do that by modifying the code. A fairly crude method would be to change


case 'change_pass' :

    if (!USER_ID) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }


to


case 'change_pass' :

    if (!GALLERY_ADMIN_MODE) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }


in your profile.php

philippefx

Quote from: Nibbler on August 18, 2010, 08:40:27 PM
You can only do that by modifying the code. A fairly crude method would be to change


case 'change_pass' :

    if (!GALLERY_ADMIN_MODE) { /* was : if (!USER_ID) { */
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }


in your profile.php

It's not a beautifull piece of code but we don't need more :)

=> Nice. Many thanks.

Αndré

Of course you can restrict it to just that user by entering the user id:
case 'change_pass' :

    if (!USER_ID || USER_ID == 42) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }

philippefx

Quote from: Αndré on September 02, 2010, 04:02:08 PM
Of course you can restrict it to just that user by entering the user id:
case 'change_pass' :

    if (!USER_ID || USER_ID == 42) {
        cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
    }


Perfect, perfect !


With love and gratitude :)

Philippe