Expose changePassword() method through the Auth object
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user