
I just copied the mailer script from the install.php (since there is an option to send the CMS admin login details by email) and modified it accordingly. Here's the script to put in a user defined tag:
Code: Select all
//$link = str_replace(" ", "%20", $_POST['docroot']);
if (isset($_POST["email"]))
{
echo "<p>E-mailing user account information...";
$to = $_POST["email"];
$subject = 'CMS Account Information';
$message = <<<EOF
You have been added as new user to CMSmadesimple.
This is your new account information:
username: {$_POST["user"]}
password: {$_POST["password"]}
Log into the site admin here: /*$link*/ http://example.com/admin/
EOF;
echo (
@mail($to, $subject, $message)
? '[done]'
: '<strong>[failed]</strong>'
);
echo '</p>';
}
This user defined tag must be attached to the event "AddUserPost" in the event list.
OK, I'm open for suggestions.
