* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
-OC_Util::checkAdminUser();
+OCP\User::checkAdminUser();
OC_Util::checkAppEnabled('admin_migrate');
// Export?
// Check if we are a user
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('bookmarks');
require_once('bookmarksHelper.php');
// Check if we are a user
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('bookmarks');
OC_App::setActiveNavigationEntry( 'bookmarks_index' );
*/
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
$cal = isset($_GET['calid']) ? $_GET['calid'] : NULL;
$event = isset($_GET['eventid']) ? $_GET['eventid'] : NULL;
*/
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
// Create default calendar ...
*/
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
$bookid = isset($_GET['bookid']) ? $_GET['bookid'] : NULL;
$contactid = isset($_GET['contactid']) ? $_GET['contactid'] : NULL;
// Check if we are a user
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
// Get active address books. This creates a default one if none exists.
// Init owncloud
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
function getStandardImage(){
// Init owncloud
OC_JSON::checkLoggedIn();
-//OC_Util::checkLoggedIn();
+//OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
function getStandardImage(){
*/
-OC_Util::checkAdminUser();
+OCP\User::checkAdminUser();
$sites = array();
for ($i = 0; $i < sizeof($_POST['site_name']); $i++) {
require_once('lib/external.php');
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
if (isset($_GET['id'])) {
<?php
-OC_Util::checkAdminUser();
+OCP\User::checkAdminUser();
OCP\Util::addscript( "external", "admin" );
// Init owncloud
-OC_Util::checkAdminUser();
+OCP\User::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true');
// Check if we are a user
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
$files = $_GET["files"];
$dir = $_GET["dir"];
// Check if we are a user
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
$filename = $_GET["file"];
*/
// Check if we are a user
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
// Load the files we need
OCP\Util::addStyle( "files", "files" );
// Check if we are a user
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
// Load the files we need
OCP\Util::addStyle( "files", "files" );
require_once('lib_share.php');
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('files_sharing');
OC_App::setActiveNavigationEntry("files_sharing_list");
<?php
-OC_Util::checkAdminUser();
+OCP\User::checkAdminUser();
OCP\Util::addscript('files_sharing', 'settings');
$tmpl = new OC_Template('files_sharing', 'settings');
$tmpl->assign('allowResharing', OC_Appconfig::getValue('files_sharing', 'resharing', 'yes'));
*/
require_once( '../../lib/base.php' );
-OC_Util::checkLoggedIn( );
+OCP\User::checkLoggedIn( );
OCP\Util::addStyle('files_versions','versions');
$tmpl = new OC_Template( 'files_versions', 'history', 'user' );
<?php
-OC_Util::checkAdminUser();
+OCP\User::checkAdminUser();
OCP\Util::addscript( 'files_versions', 'versions' );
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('gallery');
OC_App::setActiveNavigationEntry( 'gallery_index' );
// Check if we are a user
-OC_Util::checkLoggedIn();
+OCP\User::checkLoggedIn();
OC_Util::checkAppEnabled('media');
require_once(OC::$APPSROOT . '/apps/media/lib_collection.php');
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
-OC_Util::checkAdminUser();
+OCP\User::checkAdminUser();
OC_Util::checkAppEnabled('user_migrate');
// Import?
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();
+ }
+
}