I’ve tried but it doesn’t work.
My situation: a user has access to the manager as an editor for a given page only. In frontend, he can also access to an intranet that explain to him how to fill his page in the manager.
This user can login via mysite.com/manager and get directly to the editing for his page.
This user can login in mysite.com intranet and get the instructions.
Both logins work separately.
My wish: add a redirection page in the frontend intranet that leads that user directly to his manager resource without any login again.
I’ve tried the following snippet in the redirection page:
$modx->switchContext('mgr');
$path = $modx->getOption('base_url',null,MODX_BASE_URL);
$modx->sendRedirect($path.'manager/index.php?a=30&id=2');
The redirection is done, but I get the manager login form and not the resource page.