1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-17 20:11:46 +02:00
This commit is contained in:
Ryan Cramer
2019-03-19 09:54:37 -04:00
parent 019057f846
commit cfb533869d

View File

@@ -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