Expose changePassword() method through the Auth object

This commit is contained in:
2011-12-19 19:29:02 +00:00
parent 414b696f60
commit e30535f88b

View File

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