aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/notification/type/admin_activate_user.php
diff options
context:
space:
mode:
authorMaat <maat-pub@mageia.biz>2020-05-08 21:52:11 +0200
committerMaat <maat-pub@mageia.biz>2020-05-08 21:52:11 +0200
commit8ea437e30605e0f66b5220bf904a61d7c1d11ddd (patch)
treee0db2bb4a012d5b06a633160b19f62f4868ecd28 /phpBB/phpbb/notification/type/admin_activate_user.php
parent36bc1870f21fac04736a1049c1d5b8e127d729f4 (diff)
parent2fdd46b36431ae0f58bb2e78e42553168db9a0ff (diff)
downloadforums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.gz
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.bz2
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.tar.xz
forums-8ea437e30605e0f66b5220bf904a61d7c1d11ddd.zip
Merge remote-tracking branch 'upstream/prep-release-3.2.9'
Diffstat (limited to 'phpBB/phpbb/notification/type/admin_activate_user.php')
-rw-r--r--phpBB/phpbb/notification/type/admin_activate_user.php28
1 files changed, 22 insertions, 6 deletions
diff --git a/phpBB/phpbb/notification/type/admin_activate_user.php b/phpBB/phpbb/notification/type/admin_activate_user.php
index 7c5c18aa47..78c10ac36a 100644
--- a/phpBB/phpbb/notification/type/admin_activate_user.php
+++ b/phpBB/phpbb/notification/type/admin_activate_user.php
@@ -36,11 +36,27 @@ class admin_activate_user extends \phpbb\notification\type\base
/**
* {@inheritdoc}
*/
- public static $notification_option = array(
+ static public $notification_option = array(
'lang' => 'NOTIFICATION_TYPE_ADMIN_ACTIVATE_USER',
'group' => 'NOTIFICATION_GROUP_ADMINISTRATION',
);
+ /** @var \phpbb\user_loader */
+ protected $user_loader;
+
+ /** @var \phpbb\config\config */
+ protected $config;
+
+ public function set_config(\phpbb\config\config $config)
+ {
+ $this->config = $config;
+ }
+
+ public function set_user_loader(\phpbb\user_loader $user_loader)
+ {
+ $this->user_loader = $user_loader;
+ }
+
/**
* {@inheritdoc}
*/
@@ -52,7 +68,7 @@ class admin_activate_user extends \phpbb\notification\type\base
/**
* {@inheritdoc}
*/
- public static function get_item_id($user)
+ static public function get_item_id($user)
{
return (int) $user['user_id'];
}
@@ -60,7 +76,7 @@ class admin_activate_user extends \phpbb\notification\type\base
/**
* {@inheritdoc}
*/
- public static function get_item_parent_id($post)
+ static public function get_item_parent_id($post)
{
return 0;
}
@@ -114,7 +130,7 @@ class admin_activate_user extends \phpbb\notification\type\base
{
$username = $this->user_loader->get_username($this->item_id, 'no_profile');
- return $this->user->lang($this->language_key, $username);
+ return $this->language->lang($this->language_key, $username);
}
/**
@@ -159,11 +175,11 @@ class admin_activate_user extends \phpbb\notification\type\base
/**
* {@inheritdoc}
*/
- public function create_insert_array($user, $pre_create_data)
+ public function create_insert_array($user, $pre_create_data = array())
{
$this->set_data('user_actkey', $user['user_actkey']);
$this->notification_time = $user['user_regdate'];
- return parent::create_insert_array($user, $pre_create_data);
+ parent::create_insert_array($user, $pre_create_data);
}
}