Dear Kelab,
Thank you for taking the time for helping me. I want an RESTFul API file to be able to check (when a request arrives via AJAX GET, POST UPDATE DELETE) if the user is logged in. I used to do it with Concrete5 5.6 with the following code:
But now I cannot make it work on C5 5.7.4.2
What should I do? How do I load the C5 environment in ver. 5.7.4.2?
Should I use namespacing?
Please help!
Thank you
Thank you for taking the time for helping me. I want an RESTFul API file to be able to check (when a request arrives via AJAX GET, POST UPDATE DELETE) if the user is logged in. I used to do it with Concrete5 5.6 with the following code:
<?php require 'Slim/Slim.php'; \Slim\Slim::registerAutoloader(); include('helpers/adodb5/adodb.inc.php'); include('../config/site.php'); define("DIR_BASE",'..'); define('C5_ENVIRONMENT_ONLY', true); define('REDIRECT_TO_BASE_URL', false); $GLOBALS['APP_UPDATED_PASSTHRU'] = true; include(DIR_BASE . "/index.php"); Loader::library('authentication/open_id'); date_default_timezone_set('America/Caracas'); $usuario = new User(); if($usuario->isRegistered()) { ///code if is logged in
But now I cannot make it work on C5 5.7.4.2
What should I do? How do I load the C5 environment in ver. 5.7.4.2?
Should I use namespacing?
Please help!
Thank you
To check if user logged in 5.7:
http://stackoverflow.com/a/31361686...
http://stackoverflow.com/a/31361686...
Thank you!
El mar., 13 sept. 2016 a las 12:17, concrete5 Community (<
discussions@concretecms.com>) escribió:
El mar., 13 sept. 2016 a las 12:17, concrete5 Community (<
discussions@concretecms.com>) escribió:
am i answering your question?
do u mean something like this or do u want the admin to check up whether the current student is logging in?