diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 22:59:38 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-01 22:59:38 +0200 |
commit | 31e32e3c10ace169e0d841ff6e4b17d11fe64f1b (patch) | |
tree | 9a66b470bb9d5c8957a41902e17b5b4e95243343 /lib | |
parent | e2fb094693e94d425fa9f59278806ef636fc127b (diff) | |
download | nextcloud-server-31e32e3c10ace169e0d841ff6e4b17d11fe64f1b.tar.gz nextcloud-server-31e32e3c10ace169e0d841ff6e4b17d11fe64f1b.zip |
ported checkLoggedIn and checkAdmin
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/user.php | 15 | ||||
-rw-r--r-- | lib/public/util.php | 9 |
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 { + + + + + + + + + } ?> |