mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Fix empty access roles
This commit is contained in:
@@ -205,7 +205,10 @@
|
||||
}
|
||||
|
||||
if ( is_user_logged_in() && isset( $access_roles ) && !empty( $access_roles ) ){
|
||||
if ( !in_array( um_user('role'), unserialize( $access_roles ) ) ) {
|
||||
$access_roles = unserialize( $access_roles );
|
||||
$access_roles = array_filter($access_roles);
|
||||
|
||||
if ( !empty( $access_roles ) && !in_array( um_user('role'), $access_roles ) ) {
|
||||
if ( !$access_redirect ) {
|
||||
if ( is_user_logged_in() ) {
|
||||
$access_redirect = site_url();
|
||||
|
||||
Reference in New Issue
Block a user