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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drastik created an issue. See original summary.

jwjoshuawalker’s picture

Status: Active » Needs review
FileSize
1.25 KB

Patch attached. Let me know if I should do anything else.

arifkhn46’s picture

I reviewed the patch it is working good.

arifkhn46’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Version: 8.3.x-dev » 8.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.4.x, thanks!

  • catch committed da86c03 on 8.4.x
    Issue #2884141 by drastik: User AccountForm.php sets $admin var but...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.