Expose changePassword() method through the Auth object
This commit is contained in:
@@ -18,7 +18,7 @@ class SihnonFramework_Auth {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected function init($backend) {
|
protected function init($backend) {
|
||||||
$this->backend = Sihnon_Auth_PluginFactory::create($config, $backend);
|
$this->backend = Sihnon_Auth_PluginFactory::create($this->config, $backend);
|
||||||
$this->restoreSession();
|
$this->restoreSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,6 +26,10 @@ class SihnonFramework_Auth {
|
|||||||
return $this->authenticated;
|
return $this->authenticated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function authenticatedUser() {
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
|
||||||
public function saveSession() {
|
public function saveSession() {
|
||||||
if ($this->user) {
|
if ($this->user) {
|
||||||
$this->session->set('user.id', $this->user->username());
|
$this->session->set('user.id', $this->user->username());
|
||||||
@@ -81,6 +85,10 @@ class SihnonFramework_Auth {
|
|||||||
$this->authenticated = false;
|
$this->authenticated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function changePassword($new_password) {
|
||||||
|
$this->backend->changePassword($this->user, $new_password);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IPermissionable methods
|
* IPermissionable methods
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user