Permalink
Browse files

Merge pull request #639 from qrakhen/is_activated_fix

fix broken logic in the (user) isActivated() function.
  • Loading branch information...
nsams committed Oct 24, 2017
2 parents 27d1294 + 623809a commit 4be47d848be6419b156065d599b4ed79e7b46089
@@ -49,7 +49,7 @@ public function indexAction()
{
$this->view->contentScript = $this->getHelper('viewRenderer')->getViewScript('activate');
$this->view->email = $this->_getParam('user')->email;
$this->view->isActivate = $this->_getParam('user')->isActivated();
$this->view->isActivated = $this->_getParam('user')->isActivated();
$users = Kwf_Registry::get('userModel');
@@ -49,7 +49,7 @@ public function indexAction()
{
$this->view->contentScript = $this->getHelper('viewRenderer')->getViewScript('change-password');
$this->view->email = $this->_getParam('user')->email;
$this->view->isActivate = $this->_getParam('user')->isActivated();
$this->view->isActivated = $this->_getParam('user')->isActivated();
parent::indexAction();
}
@@ -52,7 +52,7 @@ public function generateActivationToken(Kwf_Model_Row_Interface $row, $type)
public function isActivated(Kwf_Model_Row_Interface $row)
{
return $row->activate_token != '';
return !$row->activate_token;
}
public function clearActivationToken(Kwf_Model_Row_Interface $row)
View
@@ -1,9 +1,9 @@
<div class="kwfUp-content">
<h1>
<?php if ($this->isActivate) { ?>
<?=trlKwf('Activate Useraccount')?>
<?php } else { ?>
<?php if ($this->isActivated) { ?>
<?=trlKwf('Reset Password')?>
<?php } else { ?>
<?=trlKwf('Activate Useraccount')?>
<?php } ?>
</h1>
<p>
@@ -1,9 +1,9 @@
<div class="kwfUp-content">
<h1>
<?php if ($this->isActivate) { ?>
<?=trlKwf('Activate Useraccount')?>
<?php } else { ?>
<?php if ($this->isActivated) { ?>
<?=trlKwf('Reset Password')?>
<?php } else { ?>
<?=trlKwf('Activate Useraccount')?>
<?php } ?>
</h1>
<p>

0 comments on commit 4be47d8

Please sign in to comment.