Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone password reset email template #31850

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ext/standaloneusers/CRM/Standaloneusers/Upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,28 @@ public function postInstall() {
// See also: `StandaloneUsers.civi-setup.php`
}

protected function createPasswordResetMessageTemplate() {
public function createPasswordResetMessageTemplate() {

$baseTpl = [
'workflow_name' => 'password_reset',
'msg_title' => 'Password reset',
'msg_subject' => '{ts}Password reset link for{/ts} {domain.name}',
'msg_text' => <<<TXT
{ts}A password reset link was requested for this account. If this wasn\'t you (and nobody else can access this email account) you can safely ignore this email.{/ts}
{ts}A password reset link was requested for this account. If this wasn't you (and nobody else can access this email account) you can safely ignore this email.{/ts}

{\$resetUrlPlaintext}

{ts}This link expires one hour after the date of this email.{/ts}
Copy link
Contributor

@ufundo ufundo Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the timeout is now parameterised, so would be good to tokenise if we can


{domain.name}
TXT,
'msg_html' => <<<HTML
<p>{ts}A password reset link was requested for this account.&nbsp; If this wasn\'t you (and nobody else can access this email account) you can safely ignore this email.{/ts}</p>
<p>{ts}A password reset link was requested for this account.&nbsp; If this wasn't you (and nobody else can access this email account) you can safely ignore this email.{/ts}</p>

<p><a href="{\$resetUrlHtml}">{\$resetUrlHtml}</a></p>

<p><strong>{ts}This link expires one hour after the date of this email.{/ts}</strong></p>

<p>{domain.name}</p>
HTML,
];
Expand Down