Current Record: getResetPasswordEmailInfo #122

Return to Application Delegate Class Table of Contents Synopsis Signature Parameters Returns Example See Also Synopsis Optional ...

Current Record: getResetPasswordEmailInfo #122

Return to Application Delegate Class Table of Contents Synopsis Signature Parameters Returns Example See Also Synopsis Optional ...

getResetPasswordEmailInfo Application Delegate Class Method

[Permalink]

Return to Application Delegate Class

Synopsis

Optional method to define the settings for the email that is sent to the user when they request to reset their password.

Introduced in Xataface 1.3. Exists in 1.3 or higher.

Signature

function getResetPasswordEmailInfo(Dataface_Record $user, string $reset_url){}

Parameters

  • $user - The Dataface_Record of the user whose password has been changed.
  • $reset_url - The URL where the user should go to reset their password. When they visit this URL they will receive a message saying that their password has been changed and the new password has been emailed to them. That subsequent email can be customized using the getPasswordChangedEmailInfo method.

Returns

This method should return an associative array with 0 or more of the following keys:

  • subject - The subject line of the email.
  • message - The message content of the email.
  • headers - The Email headers (as a string).
  • parameters - Extra parameters for the mail function.

Example

Example of the getResetPasswordEmailInfo function. This example is taken from an application that has a table to store its email templates. It loads a template named 'reset_password' from this table, provides some pattern matching/replacement to insert the username and url into the HTML content, then returns the content.

See Also

  • getPasswordChangedEmailInfo - A delegate class method to define the email that is sent to the user once their password has been reset to a temporary password. It informs the user of their new temporary password and should include instructions on how to change their password to their own choice. This step immediately follows the reset password step.
blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved