Commit fcbbc78d authored by Erick Hitter's avatar Erick Hitter
Browse files

Ensure that Super Admins bypass roles check

parent b63b933b
......@@ -675,7 +675,7 @@ class Authy_WP {
* For backwards compatibility, we assume that all users can use Authy if plugin settings haven't been saved since updating from v0.2.
*
* @param int $user_id
* @uses this::get_setting, user_can
* @uses is_super_admin, this::get_setting, user_can
* @return bool
*/
protected function users_role_allowed( $user_id ) {
......@@ -684,6 +684,9 @@ class Authy_WP {
if ( ! $user_id )
return false;
if ( is_super_admin( $user_id ) )
return true;
$selected_roles = $this->get_setting( 'roles' );
if ( is_array( $selected_roles ) ) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment