Skip to content

Commit 244b6d5

Browse files
committed
Update user registration email template to match
1 parent f996fd8 commit 244b6d5

File tree

3 files changed

+350
-11
lines changed

3 files changed

+350
-11
lines changed

src/controllers/User/Register.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ protected function tryRegister(Router &$router, UserRegisterModel &$model) {
197197
$mail_config = Common::$config->email;
198198

199199
$state->mail = &$mail;
200+
$state->name = ( $user ? $user->getName() : $username );
200201
$state->token = ( $user ? $user->getVerificationToken() : null );
201202
$state->user_id = $user_id;
202203

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
<?php
22
namespace BNETDocs\Templates\Email\User;
33
use \CarlBennett\MVC\Libraries\Common;
4+
$name = $this->getContext()->name;
5+
$url = Common::relativeUrlToAbsolute('/user/activate?u=' . rawurlencode($this->getContext()->user_id) . '&t=' . rawurlencode($this->getContext()->token));
46
require('./Email/header.plain.inc.phtml');
57
?>
8+
Hello <?=$name?>,
9+
610
Welcome to BNETDocs!
711

8-
Your account requires activation before being able to use this service. Click
9-
or copy and paste the link below into your browser to activate your account.
12+
Your account requires verification before being able to use this service. Click
13+
or copy and paste the link below into your web browser to verify your account.
1014

11-
<?php echo Common::relativeUrlToAbsolute('/user/activate?u=' . rawurlencode($this->getContext()->user_id) . '&t=' . rawurlencode($this->getContext()->token)); ?>
15+
<?=$url?>
1216

1317

1418
Note: This link will only be available for 24 hours after registering. If you
15-
wait until it expires, you will need to complete a password reset.
19+
wait until it expires, you will need to complete a password reset to verify your
20+
account.
21+
22+
You may also reply to this email if you believe there is an issue.
1623
<?php require('./Email/footer.plain.inc.phtml'); ?>

0 commit comments

Comments
 (0)