Ok cool. phpBB just lost my post. Better post it again...
At the moment I have this in main-listener:That gives an error on this line:Of course if I'd stuck to the core hack, which was already working, there would be no issues. I've already spent enough time on this to do the manual edit in at least 10 upgrades. ![Laughing :lol:]()
At the moment I have this in main-listener:
Code:
namespace gumboots\gbcurrentuser\event;/** * @ignore */use Symfony\Component\EventDispatcher\EventSubscriberInterface;/** * Gumboots Current User Event listener. */class main_listener implements EventSubscriberInterface{/* @var user */protected $user;/** @var \phpbb\template\template */protected $template;public function __construct(\phpbb\user\user $user, \phpbb\template\template $template){$this->config = $user;$this->template = $template;}static public function getSubscribedEvents(){return array('core.page_header'=> 'page_header',);}public function page_header($event){$this->template->assign_vars(array('GB_CURRENT_USER_ID' => $this->user->data['user_id'],));}}Code:
public function __construct(\phpbb\user\user $user, \phpbb\template\template $template)Code:
Fatal error: Uncaught TypeError: Argument 1 passed to gumboots\gbcurrentuser\event\main_listener::__construct() must be an instance of phpbb\user\user, instance of phpbb\user given in ...Statistics: Posted by Gumboots — Mon Apr 21, 2025 5:45 am