Merge branch 'CC-3174' into devel

This commit is contained in:
Naomi Aro 2012-04-20 16:19:29 +02:00
commit ed812159c2
5 changed files with 27 additions and 3 deletions

View File

@ -115,7 +115,7 @@ class LoginController extends Zend_Controller_Action
$auth = new Application_Model_Auth();
$auth->sendPasswordRestoreLink($user, $this->view);
$this->_helper->redirector('password-restore-after', 'auth');
$this->_helper->redirector('password-restore-after', 'login');
}
else {
$form->email->addError($this->view->translate("Given email not found."));
@ -146,7 +146,7 @@ class LoginController extends Zend_Controller_Action
//check validity of token
if (!$auth->checkToken($user_id, $token, 'password.restore')) {
echo "token not valid";
Logging::debug("token not valid");
$this->_helper->redirector('index', 'login');
}

View File

@ -16,6 +16,8 @@ class Application_Model_Auth {
$info->setDbCreated(gmdate('Y-m-d H:i:s'));
$info->save();
Logging::debug("generated token {$token}");
return $token;
}

View File

@ -8,6 +8,14 @@
<dd id="new-password-element">
<?php echo $this->element->getElement('password') ?>
</dd>
<?php if($this->element->getElement('password')->hasErrors()): ?>
<ul class='errors'>
<?php foreach($this->element->getElement('password')->getMessages() as $error): ?>
<li><?php echo $error; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<dt id="confirm-password-label">
<label for="confirm-password" class="required">
<?php echo $this->element->getElement('password_confirm')->getLabel() ?>
@ -16,6 +24,13 @@
<dd id="confirm-password-element">
<?php echo $this->element->getElement('password_confirm') ?>
</dd>
<?php if($this->element->getElement('password_confirm')->hasErrors()): ?>
<ul class='errors'>
<?php foreach($this->element->getElement('password_confirm')->getMessages() as $error): ?>
<li><?php echo $error; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<dt id="submit-label">&nbsp;</dt>
<dd id="submit-element">

View File

@ -8,6 +8,13 @@
<dd id="username-element">
<?php echo $this->element->getElement('email') ?>
</dd>
<?php if($this->element->getElement('email')->hasErrors()): ?>
<ul class='errors'>
<?php foreach($this->element->getElement('email')->getMessages() as $error): ?>
<li><?php echo $error; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<dt id="submit-label">&nbsp;</dt>

View File

@ -3,6 +3,6 @@
<h2>Email sent</h2>
<div id="login" class="login-content clearfix">
<p class="light">An email has been sent to <?php $this->form->email->getValue() ?></p>
<p class="light">An email has been sent</p>
</div>
</div>