05-29-2019, 10:26 AM
Not exactly. So in your users/views/_email_newuser.php you have the whole top part right
So after </head> and before </body>, you would put something like
<p>Hey, you got a new user at <?=$sitename?>.</p>
Then cut all that php out at the bottom.
All of that would go inside usersc/scripts/during_user_creation.php
and in that situation it would be
<?php
$params = array(
'sitename' => $settings->site_name,
);
$to = rawurlencode("you@you.com");
$subject = 'You got a new user!';
$body = email_body('_email_newuser.php',$params);
email($to,$subject,$body);
?>
So after </head> and before </body>, you would put something like
<p>Hey, you got a new user at <?=$sitename?>.</p>
Then cut all that php out at the bottom.
All of that would go inside usersc/scripts/during_user_creation.php
and in that situation it would be
<?php
$params = array(
'sitename' => $settings->site_name,
);
$to = rawurlencode("you@you.com");
$subject = 'You got a new user!';
$body = email_body('_email_newuser.php',$params);
email($to,$subject,$body);
?>