summaryrefslogtreecommitdiff
path: root/app/Controller/PasswordResetController.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-28 19:48:22 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-28 19:48:22 -0400
commit14713b0ec7ed93ca45578da069ad4e19a7d8addf (patch)
tree79972d53f6091a1ddb17f64a6a05a5523f5d5168 /app/Controller/PasswordResetController.php
parent936376ffe74c583d3cb819e98f53a85137fdf8bc (diff)
Rename all models
Diffstat (limited to 'app/Controller/PasswordResetController.php')
-rw-r--r--app/Controller/PasswordResetController.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Controller/PasswordResetController.php b/app/Controller/PasswordResetController.php
index 9036b3e7..18b4be80 100644
--- a/app/Controller/PasswordResetController.php
+++ b/app/Controller/PasswordResetController.php
@@ -52,7 +52,7 @@ class PasswordResetController extends BaseController
$this->checkActivation();
$token = $this->request->getStringParam('token');
- $user_id = $this->passwordReset->getUserIdByToken($token);
+ $user_id = $this->passwordResetModel->getUserIdByToken($token);
if ($user_id !== false) {
$this->response->html($this->helper->layout->app('password_reset/change', array(
@@ -78,11 +78,11 @@ class PasswordResetController extends BaseController
list($valid, $errors) = $this->passwordResetValidator->validateModification($values);
if ($valid) {
- $user_id = $this->passwordReset->getUserIdByToken($token);
+ $user_id = $this->passwordResetModel->getUserIdByToken($token);
if ($user_id !== false) {
- $this->user->update(array('id' => $user_id, 'password' => $values['password']));
- $this->passwordReset->disable($user_id);
+ $this->userModel->update(array('id' => $user_id, 'password' => $values['password']));
+ $this->passwordResetModel->disable($user_id);
}
return $this->response->redirect($this->helper->url->to('AuthController', 'login'));
@@ -96,10 +96,10 @@ class PasswordResetController extends BaseController
*/
private function sendEmail($username)
{
- $token = $this->passwordReset->create($username);
+ $token = $this->passwordResetModel->create($username);
if ($token !== false) {
- $user = $this->user->getByUsername($username);
+ $user = $this->userModel->getByUsername($username);
$this->emailClient->send(
$user['email'],
@@ -115,7 +115,7 @@ class PasswordResetController extends BaseController
*/
private function checkActivation()
{
- if ($this->config->get('password_reset', 0) == 0) {
+ if ($this->configModel->get('password_reset', 0) == 0) {
throw AccessForbiddenException::getInstance()->withoutLayout();
}
}