summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/public/user.php15
-rw-r--r--lib/public/util.php9
2 files changed, 24 insertions, 0 deletions
diff --git a/lib/public/user.php b/lib/public/user.php
index febac06730f..b39235bb965 100644
--- a/lib/public/user.php
+++ b/lib/public/user.php
@@ -84,6 +84,21 @@ class User {
return \OC_USER::checkPassword($uid, $password);
}
+ /**
+ * Check if the user is a admin, redirects to home if not
+ */
+ public static function checkAdminUser(){
+ \OC_Util::checkAdminUser();
+ }
+
+ /**
+ * Check if the user is logged in, redirects to home if not. With
+ * redirect URL parameter to the request URI.
+ */
+ public static function checkLoggedIn(){
+ \OC_Util::checkLoggedIn();
+ }
+
}
diff --git a/lib/public/util.php b/lib/public/util.php
index c4a73a5a7fc..5cfcbaeeffc 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -122,6 +122,15 @@ class Util {
+
+
+
+
+
+
+
+
+
}
?>