mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- added 404 trigger on categories pages when user logged in with another access role;
This commit is contained in:
@@ -132,6 +132,12 @@ if ( ! class_exists( 'Access' ) ) {
|
||||
if ( isset( $user_can ) && $user_can && $custom_restrict ) {
|
||||
$this->allow_access = true;
|
||||
return;
|
||||
} else {
|
||||
//restrict terms page by 404 for logged in users with wrong role
|
||||
global $wp_query;
|
||||
$wp_query->set_404();
|
||||
status_header( 404 );
|
||||
nocache_headers();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user