Jump to main content Jump to doc navigation

What is ForgotPassword?

ForgotPassword is a simple Snippet that handles the form when a User has forgotten their password and needs to retrieve it.

Usage

To use the password retrieval functionality, first create the Resource the user will log into when they click on the confirmation email, and put the ResetPassword snippet in. Tell it what Resource the Login snippet is in - or where you'd like it to provide a link back to:

[[!ResetPassword? &loginResourceId=`72`]]

Then create another resource with the ForgotPassword snippet, and tell it what Resource the Reset snippet is in:

[[!ForgotPassword? &resetResourceId=`123`]]

ForgotPassword Properties

ForgotPassword comes with some default properties you can override. They are:

Name Description Default
tpl The reset password message tpl. May be the type specified by the tplType property. lgnForgotPassTpl
tplType The type of tpl being provided by tpl modChunk
errTpl The error message tpl. May be the type specified by the errTplType property. lgnErrTpl
errTplType The type of tpls being provided by errTpl modChunk
emailTpl The confirmation email message tpl. lgnForgotPassEmail
emailTplAlt alternate confirmation email message tpl - for multi-part email with text alternative.
emailSubject The subject of the email message Password Retrieval Email
emailTplType The type of tpl being provided by emailTpl modChunk
sentTpl The message tpl to show when an email was successfully sent. lgnForgotPassSentTpl
sentTplType The type of tpl being provided by sentTpl modChunk
loginResourceId The resource to direct users to on successful confirmation. 1
resetResourceId The resource that contains the Login.ResetPassword Snippet. 1

tplType Options

The tplType property takes a different options. They can be:

  • modChunk - The tpl provided must be the name of a chunk.
  • file - Must be an absolute path to the tpl file.
  • inline - The content of the tpl will be directly in the tpl property itself.
  • embedded - The tpl is already in the page; just make the error properties be placeholders.

See Also

  1. Login.Login
  2. Login.Profile
  3. Login.UpdateProfile
  4. Login.Register
    1. Register.Example Form 1
  5. Login.ConfirmRegister
  6. Login.ForgotPassword
  7. Login.ResetPassword
  8. Login.ChangePassword
  9. Login.Tutorials
    1. Login.Basic Setup
    2. Login.Extended User Profiles
    3. Login.Request Membership
    4. Login.User Profiles
    5. Login.Using Custom Fields
    6. Login.Using Pre and Post Hooks

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
  • Fabian Christen
  • Dannevang Digital
  • Sepia River Studios
  • Chris Fickling
  • CrewMark
  • deJaya
  • Lefthandmedia
  • Murray Wood
  • eydolan
  • Following Sea
  • Anton Tarasov
  • Stéphane Jäggi
  • Raffy
  • Snow Creative
  • A. Moreno
  • Nick Clark
  • JT Skaggs
  • Helen
  • YJ
  • krisznet
  • Richard
  • Yanni

Budget

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

Learn more