Jump to main content Jump to doc navigation

Event: OnManagerAuthentication

Fires right before the user is authenticated or their session is added to the manager context. Use it to allow login without the password check.

If the output is true, MODX treats the user as logged in and skips the password check. An array counts as true if at least one of its indexes is true.

  • Service: 2 - Manager Access Events
  • Group: Security

Event Parameters

Name Description
& user A reference to the modUser object. Passed by reference
password The provided password.
rememberme Whether or not to remember the user via cookie.
lifetime The lifetime of the session cookie.
& loginContext The context key this login is occurring in. Passed by reference
& addContexts Additional contexts in which the login also occurs. Passed by reference

Event Login Workflow

  1. OnBeforeWebLogin || OnBeforeManagerLogin — a non-true output aborts the login with that message.
  2. OnUserNotFound — runs only when the username is missing from the MODX database. A Plugin may supply its own modUser to continue.
  3. OnWebAuthentication || OnManagerAuthentication — overrides the default password check. A true output marks the user as verified and logged in.
  4. OnWebLogin || OnManagerLogin — fires after the login has finished. It does not change the login outcome.

See Also

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.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • CrewMark
  • Fabian Christen
  • Sepia River Studios
  • Dannevang Digital
  • Alex
  • A. Moreno
  • Chris Fickling
  • Stéphane Jäggi
  • Murray Wood
  • Anton Tarasov
  • JT Skaggs
  • deJaya
  • Lefthandmedia
  • eydolan
  • Following Sea
  • Guido Gallenkamp
  • YJ
  • Raffy
  • Snow Creative
  • Nick Clark
  • Guest
  • Helen
  • krisznet
  • Yanni
  • Richard

Budget

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

Learn more