mirror of
https://github.com/processwire/processwire.git
synced 2025-08-17 20:11:46 +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 $where = null;
|
||||||
static $where2 = null;
|
static $where2 = null;
|
||||||
static $leftjoin = 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()');
|
$hasWhereHook = $this->wire('hooks')->isHooked('PageFinder::getQueryAllowedTemplatesWhere()');
|
||||||
|
|
||||||
@@ -1632,6 +1641,7 @@ class PageFinder extends Wire {
|
|||||||
$noTemplates = array();
|
$noTemplates = array();
|
||||||
|
|
||||||
$guestRoleID = $this->wire('config')->guestUserRolePageID;
|
$guestRoleID = $this->wire('config')->guestUserRolePageID;
|
||||||
|
$cacheUserID = $user->id;
|
||||||
|
|
||||||
if($user->isGuest()) {
|
if($user->isGuest()) {
|
||||||
// guest
|
// guest
|
||||||
|
Reference in New Issue
Block a user