From e30535f88b772c8912e2841c47bf09ce766f94be Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Mon, 19 Dec 2011 19:29:02 +0000 Subject: [PATCH] Expose changePassword() method through the Auth object --- source/lib/SihnonFramework/Auth.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/lib/SihnonFramework/Auth.class.php b/source/lib/SihnonFramework/Auth.class.php index 38b71ed..f5b54ad 100644 --- a/source/lib/SihnonFramework/Auth.class.php +++ b/source/lib/SihnonFramework/Auth.class.php @@ -18,7 +18,7 @@ class SihnonFramework_Auth { } protected function init($backend) { - $this->backend = Sihnon_Auth_PluginFactory::create($config, $backend); + $this->backend = Sihnon_Auth_PluginFactory::create($this->config, $backend); $this->restoreSession(); } @@ -26,6 +26,10 @@ class SihnonFramework_Auth { return $this->authenticated; } + public function authenticatedUser() { + return $this->user; + } + public function saveSession() { if ($this->user) { $this->session->set('user.id', $this->user->username()); @@ -81,6 +85,10 @@ class SihnonFramework_Auth { $this->authenticated = false; } + public function changePassword($new_password) { + $this->backend->changePassword($this->user, $new_password); + } + /* * IPermissionable methods */