Fix template helper bug due to previous refactoring

This commit is contained in:
Frederic Guillot
2015-05-30 12:56:37 -04:00
parent 7442499bb5
commit 39f9015bd8
3 changed files with 13 additions and 2 deletions

View File

@@ -10,6 +10,17 @@ namespace Helper;
*/ */
class User extends \Core\Base class User extends \Core\Base
{ {
/**
* Get user id
*
* @access public
* @return integer
*/
public function getId()
{
return $this->userSession->getId();
}
/** /**
* Get user profile * Get user profile
* *

View File

@@ -18,7 +18,7 @@
<?= $this->render('comment/create', array( <?= $this->render('comment/create', array(
'skip_cancel' => true, 'skip_cancel' => true,
'values' => array( 'values' => array(
'user_id' => $this->userSession->getId(), 'user_id' => $this->user->getId(),
'task_id' => $task['id'], 'task_id' => $task['id'],
), ),
'errors' => array(), 'errors' => array(),

View File

@@ -1,4 +1,4 @@
<form method="post" action="<?= $this->url->href('twofactor', 'check', array('user_id' => $this->userSession->getId())) ?>" autocomplete="off"> <form method="post" action="<?= $this->url->href('twofactor', 'check', array('user_id' => $this->user->getId())) ?>" autocomplete="off">
<?= $this->form->csrf() ?> <?= $this->form->csrf() ?>
<?= $this->form->label(t('Code'), 'code') ?> <?= $this->form->label(t('Code'), 'code') ?>