Hello!
I have a site (Revo 2.5.2) that passes some data to a standalone script using the jquery load() method. I want to be able to get the current modx user id in that standalone script so I can use it to validate the data (obviously I don't want to pass the user id along with the data). I have included the following lines in my standalone script and they allow me to use modx to handle my database requests, but I can't do certain other things like get the user id or load chunks -- I don't get errors, but the results are always empty.
require_once '/path/to/my/config.core.php';
require_once MODX_CORE_PATH.'model/modx/modx.class.php';
$modx = new modX();
$modx->initialize('web');
$modx->getService('error','error.modError', '', '');
Do I need to load some other services or modx objects for $modx->user->id to have a value in my standalone script?
Thanks for any help anyone can provide!