summaryrefslogtreecommitdiffstats
path: root/lib/public/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/user.php')
-rw-r--r--lib/public/user.php15
1 files changed, 15 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();
+ }
+
}