aboutsummaryrefslogtreecommitdiffstats
path: root/lib/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/user.php')
-rw-r--r--lib/user.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/user.php b/lib/user.php
index 2e11a30e85e..7eafef924a8 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -232,6 +232,19 @@ class OC_USER {
}
/**
+ * @brief get the user idea of the user currently logged in.
+ * @return string uid or false
+ */
+ public static function getUser(){
+ if( isset($_SESSION['user_id']) AND $_SESSION['user_id'] ){
+ return $_SESSION['user_id'];
+ }
+ else{
+ return false;
+ }
+ }
+
+ /**
* @brief Autogenerate a password
* @returns string
*