MODx already has a session started automatically, and user data is available from the $_SESSION array. There are quite a few API functions for determining if a user is a member of a group, as well a other user management functions.
However, if you are trying to redirect the user on login, you should use a plugin and the OnWebLogin system event. At that point, the $_SESSION array is filled in, so you can determine if the logged-in user is a member of the group.
And be sure to use this form for $modx->makeUrl():
$modx->makeUrl(12, "", "", "full");
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone: http://bobsguides.com/modx.html
Thank you for your answers. Yes I could resolve it by using the "login" plugin.
But I had a lot of chapters to read first - online and in Bob Ray's excellent book!
I am looking forward to trying other plugins to make my life easier...