diff options
author | Bart Visscher <bart@thisnet.nl> | 2011-09-18 21:31:56 +0200 |
---|---|---|
committer | Bart Visscher <bart@thisnet.nl> | 2011-09-18 21:31:56 +0200 |
commit | e990ef35426b7dde59ec74eb1568a8cfbd69f316 (patch) | |
tree | 9b4a276885378540812ce93c3cddcc73a00ba3b0 /apps/contacts/index.php | |
parent | 8966ed5a004a9b830f093355170d381566d58554 (diff) | |
download | nextcloud-server-e990ef35426b7dde59ec74eb1568a8cfbd69f316.tar.gz nextcloud-server-e990ef35426b7dde59ec74eb1568a8cfbd69f316.zip |
Move some common code to OC_Util
Created the following function:
- checkLoggedIn
- checkAdminUser
- redirectToDefaultPage
Diffstat (limited to 'apps/contacts/index.php')
-rw-r--r-- | apps/contacts/index.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/contacts/index.php b/apps/contacts/index.php index 8013f19d31f..c9cf348dfd7 100644 --- a/apps/contacts/index.php +++ b/apps/contacts/index.php @@ -28,10 +28,7 @@ function contacts_namesort($a,$b){ require_once('../../lib/base.php'); // Check if we are a user -if( !OC_User::isLoggedIn()){ - header( 'Location: '.OC_Helper::linkTo( '', 'index.php' )); - exit(); -} +OC_Util::checkLoggedIn(); // Check if the user has an addressbook $addressbooks = OC_Contacts_Addressbook::all(OC_User::getUser()); |