Check User logged in

Permalink
Hello

How can I check if a User is logged in?

Thank you

titanve
 
KelabKebajikan replied on at Permalink Reply
https://www.safaribooksonline.com/library/view/concrete5-cookbook/9781782164548/ch07s02.html

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?
titanve replied on at Permalink Reply
titanve
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:

<?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
ob7dev replied on at Permalink Reply
ob7dev
To check if user logged in 5.7:
http://stackoverflow.com/a/31361686...
titanve replied on at Permalink Reply
titanve
Thank you!

El mar., 13 sept. 2016 a las 12:17, concrete5 Community (<
discussions@concretecms.com>) escribió: