diff options
author | Joey3000 <Joey3000@users.noreply.github.com> | 2015-09-01 06:19:02 +0300 |
---|---|---|
committer | Joey3000 <Joey3000@users.noreply.github.com> | 2015-09-01 06:19:02 +0300 |
commit | 3280f1504c4ad5754097b94ebe1c3b464756a641 (patch) | |
tree | 26eee5fecf20f2aa537026b76c2e7676551d8d4d /plugins/Login/Controller.php | |
parent | 1dadb5b498e4be5c8e0d91b54d1085fea9e5eb8c (diff) |
Change private variables and methods to protected.
The current use of "private" prevents class variable and method inheritance in child classes. The "protected" ones on the other hand, offer the same access control, but can be inherited.
Impact: I'm working on a plugin to encrypt the transmitted password. That plugin "extends" many of the classes of the core Login plugin. The current usage of "private" forces me to, unnecessarily duplicate (copy-paste) the "private" members of the Login parent class, without any modification. I tested this patch with 2.14.3 and it works flawlessly with my (future) plugin.
Also, it maybe could help https://github.com/torosian/LoginRevokable/issues/1.
Thanks in advance.
Diffstat (limited to 'plugins/Login/Controller.php')
-rw-r--r-- | plugins/Login/Controller.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php index 454a0d6796..956f725840 100644 --- a/plugins/Login/Controller.php +++ b/plugins/Login/Controller.php @@ -31,17 +31,17 @@ class Controller extends \Piwik\Plugin\Controller /** * @var PasswordResetter */ - private $passwordResetter; + protected $passwordResetter; /** * @var Auth */ - private $auth; + protected $auth; /** * @var SessionInitializer */ - private $sessionInitializer; + protected $sessionInitializer; /** * Constructor. @@ -124,7 +124,7 @@ class Controller extends \Piwik\Plugin\Controller * * @param View $view */ - private function configureView($view) + protected function configureView($view) { $this->setBasicVariablesView($view); @@ -261,7 +261,7 @@ class Controller extends \Piwik\Plugin\Controller * @param QuickForm2 $form * @return array Error message(s) if an error occurs. */ - private function resetPasswordFirstStep($form) + protected function resetPasswordFirstStep($form) { $loginMail = $form->getSubmitValue('form_login'); $password = $form->getSubmitValue('form_password'); |