Bug : Users cannot update their profiles

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
melix

Bug : Users cannot update their profiles

Post by melix »

I think this is a bug : when a user does not have rights to add users (for example an editor), he doesn't have access to edit his own profile.

Workaround : directly type in the URL : http:///admin/listusers.php and click on the edit icon.

I think there should be a direct link to edit your own profile (for example to change your password).

Missing feature in 0.11b4 too ;)
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Bug : Users cannot update their profiles

Post by Ted »

Yeah, this is an issue with menus...

sjg, can you look into this, since you understand it more than me?  :)
melix

Re: Bug : Users cannot update their profiles

Post by melix »

Take a look at lines 292-294 of file class.admintheme.inc.php :

Code: Select all

        $this->perms['userPerms'] = check_permission($this->userid, 'Add Users') |
                check_permission($this->userid, 'Modify Users') |
                check_permission($this->userid, 'Remove Users');
These lines assume that the user must have either the rights to add, modify or remove users in order to display the "Users/Groups" menu item. If you replace these lines with a simple

Code: Select all

$this->perms['userPerms'] = true; 
the problem will be fixed, but the menu item will not really sound friendly. You'd have to go to the Users/Groups menu, then "Users" and later click on your edit icon just to edit your profile. This is not user friendly. For me the best thing to do would be to add a menu entry "My Profile" which directly links to the user profile edition.
melix

Re: Bug : Users cannot update their profiles

Post by melix »

ok, here's a working patch :

In the class.admintheme.inc.php file, insert @ line 730, just before

Code: Select all

// base view site menu ---------------------------------------------------------
The following code :

Code: Select all

            // user profile
            'profile'=>array('url'=>'edituser.php?user_id='.$this->userid, 'parent'=>-1,
                    'title'=>$this->FixSpaces(lang('profile')),
                    'description'=>'', 'show_in_menu'=>true),
Then, add at the bottom of your lang file the following line (e.g. admin/lang/en_US/admin.inc.php) :

Code: Select all

$lang['admin']['profile'] = 'My profile'; // needs translation
For french people, (fr_FR) :

Code: Select all

$lang['admin']['profile'] = 'Mon profil'; // needs translation
And that will do ;)
Last edited by melix on Mon Nov 07, 2005 5:40 pm, edited 1 time in total.
Locked

Return to “CMSMS Core”