Skip to content

Commit 2ea3a2d

Browse files
committed
Add user object to service
1 parent a5db0d6 commit 2ea3a2d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

config/services.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ services:
44
arguments:
55
- @config
66
- @template
7+
- @user
78
tags:
89
- { name: event.listener }

event/listener.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,23 @@ class listener implements EventSubscriberInterface
2323
/** @var \phpbb\template\template */
2424
protected $template;
2525

26+
/** @var \phpbb\user */
27+
protected $user;
28+
2629
/**
2730
* Constructor
2831
*
2932
* @param \phpbb\config\config $config Config object
3033
* @param \phpbb\template\template $template Template object
34+
* @param \phpbb\user $user User object
3135
* @return \phpbb\boardrules\event\listener
3236
* @access public
3337
*/
34-
public function __construct(\phpbb\config\config $config, \phpbb\template\template $template)
38+
public function __construct(\phpbb\config\config $config, \phpbb\template\template $template, \phpbb\user $user)
3539
{
3640
$this->config = $config;
3741
$this->template = $template;
42+
$this->user = $user;
3843
}
3944

4045
/**

0 commit comments

Comments
 (0)