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 */