mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 12:10:45 +02:00
Fix issue processwire/processwire-issues#334
This commit is contained in:
@@ -1604,6 +1604,15 @@ class PageFinder extends Wire {
|
||||
static $where = null;
|
||||
static $where2 = null;
|
||||
static $leftjoin = null;
|
||||
static $cacheUserID = null;
|
||||
|
||||
if($cacheUserID !== $user->id) {
|
||||
// clear cached values
|
||||
$where = null;
|
||||
$where2 = null;
|
||||
$leftjoin = null;
|
||||
$cacheUserID = $user->id;
|
||||
}
|
||||
|
||||
$hasWhereHook = $this->wire('hooks')->isHooked('PageFinder::getQueryAllowedTemplatesWhere()');
|
||||
|
||||
@@ -1632,6 +1641,7 @@ class PageFinder extends Wire {
|
||||
$noTemplates = array();
|
||||
|
||||
$guestRoleID = $this->wire('config')->guestUserRolePageID;
|
||||
$cacheUserID = $user->id;
|
||||
|
||||
if($user->isGuest()) {
|
||||
// guest
|
||||
|
Reference in New Issue
Block a user