summaryrefslogtreecommitdiff
path: root/app/Core/User/UserSession.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-03-26 14:43:41 -0400
committerFrederic Guillot <fred@kanboard.net>2016-03-26 14:43:41 -0400
commit820c929ab38273c80d0930e2e6140dd7676ba4df (patch)
tree3944047e41d14077f7e5e8c0d50856b360a22567 /app/Core/User/UserSession.php
parente71f37238c82f01cd02d6d7343b42328d9603d14 (diff)
Added avatar image upload
Diffstat (limited to 'app/Core/User/UserSession.php')
-rw-r--r--app/Core/User/UserSession.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/Core/User/UserSession.php b/app/Core/User/UserSession.php
index e494e7b4..0034c47a 100644
--- a/app/Core/User/UserSession.php
+++ b/app/Core/User/UserSession.php
@@ -14,6 +14,19 @@ use Kanboard\Core\Security\Role;
class UserSession extends Base
{
/**
+ * Refresh current session if necessary
+ *
+ * @access public
+ * @param integer $user_id
+ */
+ public function refresh($user_id)
+ {
+ if ($this->getId() == $user_id) {
+ $this->initialize($this->user->getById($user_id));
+ }
+ }
+
+ /**
* Update user session
*
* @access public