From 3eacdaeed68d0c10f9bc957433f7c36cb91837e5 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Thu, 9 Jun 2016 19:25:58 +0800 Subject: [PATCH] Fix admin access restriction --- core/um-actions-login.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/um-actions-login.php b/core/um-actions-login.php index 2b782c79..be0a6422 100644 --- a/core/um-actions-login.php +++ b/core/um-actions-login.php @@ -158,9 +158,8 @@ extract( $args ); $rememberme = ( isset($args['rememberme']) ) ? 1 : 0; - - - if ( ( um_get_option('deny_admin_frontend_login') && ! isset( $_GET['provider'] ) ) && strrpos( um_user('wp_roles' ), 'administrator' ) >= 0 ){ + + if ( ( um_get_option('deny_admin_frontend_login') && ! isset( $_GET['provider'] ) ) && strrpos( um_user('wp_roles' ), 'administrator' ) !== FALSE ){ wp_die( __('This action has been prevented for security measures.','ultimatemember') ); }