Closed bleutzinn closed 5 years ago
I will check this out.. thanks.
Actually, 2FA is a user and a system-wide setting...
Disabling 2FA in the plugin just means the option is not available to the user, and not checked if you have 2FA enabled for the user.
The badge indicates that the user has the option enabled. I will add an extra check to ensure both system and user options are checked for the badge to show.
Using Grav v1.5.6 and Admin v1.8.15, enabling and then disabling 2FA leaves the admin-user-details badge showing "2FA" in the Admin panel.
This is caused by the Twig partial
nav-user-details.html.twig
(see line 9) which uses the settingadmin.user.twofa_enabled
.This setting is set to
true
when enabling 2FA but appears not to set tofalse
when 2FA is disabled later on.As 2FA is not a per user setting but rather system wide a quick fix would be to have the Twig look at
admin.twofa_enabled
instead.