summaryrefslogtreecommitdiffstats
path: root/lib/public/user.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-01 22:59:38 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-01 22:59:38 +0200
commit31e32e3c10ace169e0d841ff6e4b17d11fe64f1b (patch)
tree9a66b470bb9d5c8957a41902e17b5b4e95243343 /lib/public/user.php
parente2fb094693e94d425fa9f59278806ef636fc127b (diff)
downloadnextcloud-server-31e32e3c10ace169e0d841ff6e4b17d11fe64f1b.tar.gz
nextcloud-server-31e32e3c10ace169e0d841ff6e4b17d11fe64f1b.zip
ported checkLoggedIn and checkAdmin
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();
+ }
+
}