Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On line 72 of: core/modules/user/src/AccountForm.php
it sets:
$admin = $user->hasPermission('administer users');
then it uses it in several places, but misses opportunity in 2 other places, and just calls the hasPermisison()
method again instead.
Patch in next comment. This is against 8.3.x, but I can also roll one for 8.4.x if I need to.
Comment | File | Size | Author |
---|---|---|---|
#2 | user-accountform-use-admin-var-2884141-2.patch | 1.25 KB | jwjoshuawalker |
Comments
Comment #2
jwjoshuawalker CreditAttribution: jwjoshuawalker as a volunteer commentedPatch attached. Let me know if I should do anything else.
Comment #3
arifkhn46 CreditAttribution: arifkhn46 as a volunteer commentedI reviewed the patch it is working good.
Comment #4
arifkhn46 CreditAttribution: arifkhn46 as a volunteer commentedComment #5
catchCommitted/pushed to 8.4.x, thanks!