Hello
I'm trying to set an autologin page with a token and some other params.
example
www.mysite.com/autologin.php?token=007878de78dehue7ed08de7&lg=en
I need to set it through the modx API not with the Login snippet.
The solution of Bob gives me 'Notice: Undefined index: returnUrl ... Fatal error: Call to a member function failure() on a non-object'
$_POST['username'] = $user;
$_POST['password'] = $pass;
$_POST['service'] = 'login';
$_REQUEST['service'] = 'login';
$scriptProperties['loginResourceId'] = 499; // set to page you want to send them to
$modx->runSnippet('Login', $scriptProperties);
Any help would be appreciated.
Thanks