summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-05-29 00:47:55 +0200
committerRobin Appelman <icewind@owncloud.com>2013-05-29 00:47:55 +0200
commit3e7e2c8a5c5eb51d04302520f1367125c98644bd (patch)
tree6f0927faf1ea917cba3cce55078b67000b98005d /lib
parent198655f109a40074643c516e24c0bd8aef6d7cd7 (diff)
downloadnextcloud-server-3e7e2c8a5c5eb51d04302520f1367125c98644bd.tar.gz
nextcloud-server-3e7e2c8a5c5eb51d04302520f1367125c98644bd.zip
fix setting getting active userid
Diffstat (limited to 'lib')
-rw-r--r--lib/user.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/user.php b/lib/user.php
index cebae2493f3..efae4f9aa36 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -220,8 +220,7 @@ class OC_User {
* @brief Sets user id for session and triggers emit
*/
public static function setUserId($uid) {
- $user = self::getManager()->get($uid);
- self::getUserSession()->setUser($user);
+ OC::$session->set('user_id', $uid);
}
/**
@@ -297,9 +296,9 @@ class OC_User {
* @return string uid or false
*/
public static function getUser() {
- $user = self::getUserSession()->getUser();
- if ($user) {
- return $user->getUID();
+ $uid = OC::$session->get('user_id');
+ if (!is_null($uid)) {
+ return $uid;
} else {
return false;
}