summaryrefslogtreecommitdiffstats
path: root/lib
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
parente2fb094693e94d425fa9f59278806ef636fc127b (diff)
downloadnextcloud-server-31e32e3c10ace169e0d841ff6e4b17d11fe64f1b.tar.gz
nextcloud-server-31e32e3c10ace169e0d841ff6e4b17d11fe64f1b.zip
ported checkLoggedIn and checkAdmin
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 {
+
+
+
+
+
+
+
+
+
}
?>