? ? Pending

User tests: Successful: Unsuccessful:

avatar Harmageddon
Harmageddon
26 Jul 2020

As mentioned in #30152 (comment), the method ProfileModel::save is mostly a copy of its parent UserModel::save. This is going to lead to problems (just like the issue fixed in #30152), because every time someone changes the method UserModel::save, they need to remember about ProfileModel and might need to include the same change there.

Summary of Changes

By calling the parent method, code duplication is reduced. As the form in the profile view is a reduced form of the user edit form, some values need to be changed, because the validation inside UserModel::save would fail otherwise.

Testing Instructions

  1. Log in to backend with an account with "Manager" permissions.
  2. Edit your profile by clicking on "User Menu" (top right) - "Edit Account", change something and save.
  3. Make sure everything regarding changing the profile works.
  4. Log in to backend with an account with "Administrator" permissions (not Super User!).
  5. Edit your profile by clicking on "User Menu" (top right) - "Edit Account", change something and save.
  6. Make sure everything regarding changing the profile works.
  7. Navigate to "Users - Manage".
  8. Edit your own account there, change something, save.
  9. Edit another account there, change something, save.
  10. Make sure everything regarding editing user accounts works.
  11. Log in to backend with an account with "Super User" permissions. Repeat steps 5-10.

Expected result AFTER applying this Pull Request

Everything should still work like before.

Documentation Changes Required

None

/cc @SharkyKZ

avatar Harmageddon Harmageddon - open - 26 Jul 2020
avatar Harmageddon Harmageddon - change - 26 Jul 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jul 2020
Category Administration com_admin
avatar richard67 richard67 - change - 26 Jul 2020
Title
Reduced duplicated code in ProfileModel.
[4.0] Reduced duplicated code in ProfileModel.
avatar richard67 richard67 - edited - 26 Jul 2020
avatar ChristineWk ChristineWk - test_item - 26 Jul 2020 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 26 Jul 2020

I have tested this item successfully on 5b5c43d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30194.

avatar bonzani bonzani - test_item - 26 Jul 2020 - Tested successfully
avatar bonzani
bonzani - comment - 26 Jul 2020

I have tested this item successfully on 5b5c43d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30194.

avatar Quy Quy - change - 26 Jul 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 26 Jul 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30194.

avatar wilsonge wilsonge - change - 29 Jul 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-07-29 16:55:33
Closed_By wilsonge
Labels Added: ? ?
avatar wilsonge
wilsonge - comment - 29 Jul 2020

Thanks!

Add a Comment

Login with GitHub to post a comment