Skip to content

Commit

Permalink
Merge pull request #2 from humanmade/force-2fa-fix-empty-role-config
Browse files Browse the repository at this point in the history
Allow user to remove forced 2fa on all roles
  • Loading branch information
joehoyle authored Jul 18, 2019
2 parents 7b4cce3 + f7cc27e commit 252e3e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions class.two-factor-force.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ public static function global_force_2fa_by_role_field() {
$forced_roles = self::get_forced_user_roles();
$is_universally_forced = self::get_universally_forced_option();

?>
<input type="hidden" name="<?php echo esc_attr( sprintf( '%s[%s]', self::FORCED_ROLES_META_KEY, 'no-role-selected' ) ); ?>" />
<?php

foreach ( get_editable_roles() as $slug => $role ) :
?>
<label>
Expand Down

0 comments on commit 252e3e0

Please sign in to comment.