[4.0] Allow users edit account via com_users without core.manager permission#32771
[4.0] Allow users edit account via com_users without core.manager permission#32771wilsonge merged 18 commits intojoomla:4.0-devfrom
Conversation
|
In principle yes this is how I see it being done |
|
@brianteeman Could you please try it quickly to see what is missing or still need to be addressed? |
|
From my quick test with both a manager and super administrator account this PR works correctly and is how it should have been done from the beginning without all the duplication of code in com_admin |
|
@joomdonation Event if it’s draft status you should fix the PHPCS (code style) errors reported by drone, because only if these pass the system tests will be run, and those would show if there was a mistake. |
@joomdonation Should the title of the PR be changed from "[4.0] Allow Managers to edit account via com_users" to "[4.0] Allow Managers to edit own account via com_users"? |
|
@richard67 Yes. I changed it to a better title (describe exactly what PR does) |
|
@joomdonation Your last commit changed the since tag at the wrong place. the old function should remain 1.6 and the new one should get deploy version, but you did it vice versa ;-) |
administrator/components/com_users/src/Controller/UserController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_users/src/Controller/UserController.php
Outdated
Show resolved
Hide resolved
administrator/components/com_users/src/Dispatcher/Dispatcher.php
Outdated
Show resolved
Hide resolved
|
Thanks @richard67. Hope it is all OK now. On top of my head, this PR is now ready for reviewing and testing. Hopefully we can close the release blocker issue #30217 |
Yes, code looks ok and clean to me.
You mean this PR solves it? If you confirm, I will close it. |
|
Added the release blocker label as inherited from the issue. |
|
@richard67 Yes, I think we can close that issue. Even if this PR is not accepted, I think most users can agree that it is not release blocker anymore (the problem right now is just duplication code which is solved if this PR is accepted) |
@joomdonation You mean I should remove the release blocker label from this PR? |
|
Back to pending This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771. |
|
setting back to pending This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771. |
administrator/components/com_users/src/Dispatcher/Dispatcher.php
Outdated
Show resolved
Hide resolved
administrator/components/com_users/src/Dispatcher/Dispatcher.php
Outdated
Show resolved
Hide resolved
|
So the problem is that PDO return string data type for User ID but MySQLi return int data type . I was not sure about it and that was the reason I used weak comparison at the begininging I made modification as suggested. I tested it myself with both PDO and MySQLi, it is working well now. Please test it again. Thanks all for reviewing and testing and sorry for taking so much time from you for this PR. |
|
I have tested this item ✅ successfully on f47df46 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771. |
|
@brianteeman Could you please re-test this PR? |
|
I have tested this item ✅ successfully on f47df46 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32771. |
|
Thankyou so much guys. Much appreciated! |

Pull Request for Issue #30217.
Summary of Changes
This PR allows users to edit their account from administrator area of the site without requiring to have core.manager permission. If it is accepted, it will solve the release blocker issue #30217. Also, it allows us to removing the code which we have to add to com_admin to allow editing profile at the moment.
Testing instructions