From 5cc6e07813a68e958ef93d8c26b6ed215fbd48f3 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Mon, 6 Jun 2016 22:24:54 +0800 Subject: [PATCH] Fix admin front-end restriction access --- core/um-actions-login.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/um-actions-login.php b/core/um-actions-login.php index 74494593..2b782c79 100644 --- a/core/um-actions-login.php +++ b/core/um-actions-login.php @@ -159,7 +159,8 @@ $rememberme = ( isset($args['rememberme']) ) ? 1 : 0; - if ( ( um_get_option('deny_admin_frontend_login') && ! isset( $_GET['provider'] ) ) && ! strstr( um_user('wp_roles' ), 'administrator' ) > -1 ){ + + if ( ( um_get_option('deny_admin_frontend_login') && ! isset( $_GET['provider'] ) ) && strrpos( um_user('wp_roles' ), 'administrator' ) >= 0 ){ wp_die( __('This action has been prevented for security measures.','ultimatemember') ); }