-
- 84 Posts
I'm looking for a direct method to log a user out via PHP, like $modx->logOutWebUser or something along those lines. All I've been able to find is a way to log them out via URI parameters, ?webloginmode=lo. Looking for a way to do this before the page is fully parsed and loaded without changing the URI.
You should be able to use runProcessor('security/logout' ... )
The Login extra uses this code:
$response = $this->modx->runProcessor('security/logout',array(
'login_context' => $this->getProperty('loginContext',$this->modx->context->get('key')),
'add_contexts' => $this->getProperty('contexts',''),
See core/components/login/controllers/web/Login.php, around line 346.
Oops... sorry, I didn't notice you were using Evo.
See assets/snippets/weblogin/weblogin.processor.php around line 127.
Basically, it just gets rid of the session cookie as well as the SESSION values relating to the web login.
-
- 84 Posts
Thanks, Susan. I can definitely work with that!