How do I load the Concrete5 5.7.4.2 environment in order to check if a user is logged in or registered? I used to do it in 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 use it with ver 5.7.4.2. The $usuario
var contains an empty user object. Does it have to do with the namespacing?