This question has been answered by Bruno17. See the first response.
$id = $modx->user->get('id'); if ($id != 12) { return 'Sorry, you're not allowed to see this page'; }
$id = $modx->user->get('id'); if ($id != 12) { $url = $modx->makeUrl(22, "", "", "full"); // change 22 to the ID of the login page $modx->sendRedirect($url); return ''; }
You could put a snippet at the top of the landing pages with code like this:
$id = $modx->user->get('id'); if ($id != 12) { return 'Sorry, you're not allowed to see this page'; }
You'd change 12 to the ID of the user who was not authorized on each page.
You could also just redirect unauthorized users back to the login page:
$id = $modx->user->get('id'); if ($id != 12) { $url = $modx->makeUrl(22, "", "", "full"); // change 22 to the ID of the login page $modx->sendRedirect($url); return ''; }
If you're trying to show something different depending on the user group, Personalize might be what you're looking for: http://modx.com/extras/package/personalize
I'm still confused why you need two different login forms though. Why can't they both use the same login form? Or is one person supposed to login twice?