Blog Sections Open

Routing Different WebLoginPE Users to Different Account Dashboards

A practical pattern for projects that use one login system but need different dashboards for different user roles or audiences.

When a site supports more than one audience, a single account page quickly becomes awkward. A typical example is a marketplace where clients and contractors both sign in through WebLoginPE but need different post-login experiences.

The clean solution

Keep the authentication flow shared, but separate the account landing pages by user group or profile type. After login, inspect the authenticated user and redirect them to the correct dashboard.

Recommended approach

  1. Assign each audience to its own web group during registration.
  2. Create a dedicated dashboard resource for each group.
  3. After login, run a small redirect snippet or plugin that checks group membership.
  4. Keep account-specific chunks and snippets isolated so each dashboard stays maintainable.
if (in_array('Customers', $groups, true)) {
    $modx->sendRedirect($modx->makeUrl(123));
}
if (in_array('Contractors', $groups, true)) {
    $modx->sendRedirect($modx->makeUrl(124));
}

This keeps the login form simple while making the user journey feel purpose-built. It also makes later permissions work much easier because the dashboards are already separated structurally.

Newer post

A Safer AJAX Routing Pattern for Evolution CMS with OnPageNotFound

How to route AJAX requests through Evolution CMS without relying on unsafe generic snippet execution endpoints.

Older post

Building Region and City Selectors in a WebLoginPE Registration Form

How to add dependent region and city dropdowns to a WebLoginPE registration flow without turning the form into an unmaintainable mess.