summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/Helper/User.php11
-rw-r--r--app/Template/task/comments.php2
-rw-r--r--app/Template/twofactor/check.php2
3 files changed, 13 insertions, 2 deletions
diff --git a/app/Helper/User.php b/app/Helper/User.php
index 00018857..1cad6042 100644
--- a/app/Helper/User.php
+++ b/app/Helper/User.php
@@ -11,6 +11,17 @@ namespace Helper;
class User extends \Core\Base
{
/**
+ * Get user id
+ *
+ * @access public
+ * @return integer
+ */
+ public function getId()
+ {
+ return $this->userSession->getId();
+ }
+
+ /**
* Get user profile
*
* @access public
diff --git a/app/Template/task/comments.php b/app/Template/task/comments.php
index f81e0dc9..a09862f9 100644
--- a/app/Template/task/comments.php
+++ b/app/Template/task/comments.php
@@ -18,7 +18,7 @@
<?= $this->render('comment/create', array(
'skip_cancel' => true,
'values' => array(
- 'user_id' => $this->userSession->getId(),
+ 'user_id' => $this->user->getId(),
'task_id' => $task['id'],
),
'errors' => array(),
diff --git a/app/Template/twofactor/check.php b/app/Template/twofactor/check.php
index 0e29d526..68a58a6c 100644
--- a/app/Template/twofactor/check.php
+++ b/app/Template/twofactor/check.php
@@ -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->label(t('Code'), 'code') ?>