-
Bug
-
Resolution: Fixed
-
Minor
-
2.6.3, 2.7, 2.8
-
MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
If a user has the capability to edit a profile page of another user and hits the 'Customise this page' button they are taken to their own profile page rather than the profile page of the user they clicked the 'Customise this page' button on.
How to reproduce:
Setup:
- Create a user who has the capability to edit user profiles, for example the site admin (User A)
- Create another user (User B)
Steps to cause the failure:
- Login as User A
- Visit the profile page of User B
- Click on the 'Customise this page' button
- User A's profile page will be loaded with editing turned on.
What should happen:
- Login as User A
- Visit the profile page of User B
- Click on the 'Customise this page' button
- User B's profile page should be loaded with editing turned on.
The cause
This is happening because the customise this page button's form is not passing the id parameter.
It can be fixed by adding the following the params array to line 177 of profile.php:
'id' => $userid