Project

General

Profile

Actions

Bug #5774

closed

CBuser does not allow pre-setting a guest user object

Added by krileon almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
09 February 2016
Due date:
% Done:

100%

Estimated time:

Description

When calling setUserGetCBUserInstance with a guest user object it's ignored. The problem is you won't be able to use pre-parsed substitutions because it won't set the object. It instead just builds a new guest object. Allow setUserGetCBUserInstance to send an instance of $user and ignore the ->id check.

The workaround is as follows.

$cbUser = new CBuser();
$cbUser->_cbuser = $user;

Basically the last else case just needs to handle $user if preset and is an object instead of making a new one.

Actions

Also available in: Atom PDF