From 241956149a23656c65769f0395534c5f29071c14 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Thu, 5 May 2016 22:24:15 +0800 Subject: [PATCH] Fix admin access in front-end login --- 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 d64fd563..aaac4abc 100644 --- a/core/um-actions-login.php +++ b/core/um-actions-login.php @@ -157,8 +157,9 @@ $rememberme = ( isset($args['rememberme']) ) ? 1 : 0; - if ( um_get_option('deny_admin_frontend_login') && ! isset( $_GET['provider'] ) && strstr( um_user('wp_roles' ), 'administrator' ) ) + if ( ( um_get_option('deny_admin_frontend_login') && ! isset( $_GET['provider'] ) ) && ! strstr( um_user('wp_roles' ), 'administrator' ) > -1 ){ wp_die( __('This action has been prevented for security measures.','ultimatemember') ); + } $ultimatemember->user->auto_login( um_user('ID'), $rememberme );