Jump to main content Jump to doc navigation

The Login controller is used for either showing a login form, or when discuss.sso_mode is enabled (recommended), to redirect the user to the login page.

Basic Information

Since Version 1.0
Controller File controllers/web/login.class.php
Controller Class Name DiscussLoginController
Controller Template pages/login.tpl (if sso_mode=0)
Manifest Name login


The Login controller does not have any manifest options.

The usage of the Login controller depends on 2 system settings. If the discuss.login_resource_id is set and discuss.sso_mode is enabled, the Login controller will simply redirect requests to the resource specified by the login_resource_id setting with a &discuss=1 query string.

If either sso_mode is disabled or no login_resource_id is set, the Login controller will use the pages/login.tpl template to display a login form.

Controller Template

There are no specific placeholders to use in this controller template.


Please note that the disLoginTpl and disLogoutTpl chunks are currently (1.1.0) not included in the package, but can be any valid Login chunk. In order to properly sync user data to Discuss, you will need to have the preHook.DiscussLogin as prehook and postHook.DiscussLogin as posthook - also when using a third party auth scheme.

Follow these instructions to set up login on your site using sso_mode (recommended).

System Events

No custom system events trigger on this controller.

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.



$0 per month—let's make that $500!

Learn more