<![CDATA[ Access frontend user via processor? - MODX Community Forums]]> https://forums.modx.com/thread/?thread=104916 <![CDATA[Access frontend user via processor?]]> https://forums.modx.com/thread/104916/access-frontend-user-via-processor#dis-post-564134
I login a user with

$modx->user->addSessionContext('web');


And if I check via frontend, the user is logged in. I can access user object, get id, username etc.

But if I try to access user via processor

$this->modx->user->get('id');


i become anonymus user with id 0 etc.

The processor is working in 'web' context. At least,

$this->modx->context->get('key');


returns 'web'. But I've tryed to login user to both 'web' and 'mgr' contexts - same results.

On other hand, if there is a user logged in into manager, my processor returns this manager user, not depending if there is a user logged in in frontend.

How can I access a frontend user in processor? Thx.]]>
dopeless Feb 19, 2019, 09:36 AM https://forums.modx.com/thread/104916/access-frontend-user-via-processor#dis-post-564134
<![CDATA[Re: Access frontend user via processor?]]> https://forums.modx.com/thread/104916/access-frontend-user-via-processor#dis-post-564146 BobRay Feb 19, 2019, 08:11 PM https://forums.modx.com/thread/104916/access-frontend-user-via-processor#dis-post-564146