mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-30 19:52:17 +01:00
Move some common code to OC_Util
Created the following function: - checkLoggedIn - checkAdminUser - redirectToDefaultPage
This commit is contained in:
parent
09d599633f
commit
ff73f4315f
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user