ResetPassword
Last updated Mar 6th, 2021 | Page history | Improve this page | Report an issue
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
Budget
$335 per month—let's make that $500!
Learn moreWhat is ResetPassword?¶
ResetPassword is a simple Snippet that is used in conjunction with ForgotPassword, allowing users to retrieve and reset their password. This Snippet is placed on the page the User will receive in an email, which when they visit will reset their password.
Usage¶
To use the password retrieval functionality, first create the Resource the user will log in to should 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`]]
ResetPassword Properties¶
ResetPassword 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. | lgnResetPassTpl |
tplType | The type of tpl being provided by tpl | modChunk |
loginResourceId | The resource to direct users to on successful reset. | 1 |
expiredTpl | The temporary password has expired tpl. | lgnExpiredTpl |
changePasswordTpl | The change password form tpl. | lgnResetPassChangePassTpl |
autoLogin | Immediately log in the user upon clicking the reset link from email. | false |
forceChangePassword | Require immediate password change upon clicking the reset link from email. | false |
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¶
- Login.Login
- Login.Profile
- Login.UpdateProfile
- Login.Register
- Login.ConfirmRegister
- Login.ForgotPassword
- Login.ResetPassword
- Login.ChangePassword
- Login.Tutorials
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
Budget
$335 per month—let's make that $500!
Learn more