summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/forgot.tpl5
-rw-r--r--inc/functions.php11
2 files changed, 14 insertions, 2 deletions
diff --git a/inc/forgot.tpl b/inc/forgot.tpl
index 4c4ed4d..38e109f 100644
--- a/inc/forgot.tpl
+++ b/inc/forgot.tpl
@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8" />
- <title>Recover Your Bulletin Account</title>
+ <title>Your New Bulletin Password</title>
</head>
<body>
<div id="head" style="text-align: center; width: 100%; height: 110px; border-bottom: 1px solid #dddddd;">
@@ -13,11 +13,12 @@
<div style="width: 450px; display: table; margin: 1em auto;">
<div style="font-family: sans-serif; font-size: 12pt; text-align: center; margin: 15px -15px; width: 100%; display: block;">
<p style="width: 100%;">We're sorry you've lost access to your account!</p>
- <p style="width: 100%;">To log in and change your password, <a style="color: #fb4d00;" href="[config:base_url]forgot.php?[tpl:vars]">click here</a>.</p>
+ <p style="width: 100%;">To make the recovery process easier, we've generated a new password for you. You can now log in with the password: [tpl:newpass]</p>
</div>
</div>
<div style="width: 450px; height: 1px; margin: auto; background: #dddddd;"></div>
<p style="margin-top: 2em; text-align: center; font-family: sans-serif; font-size: 12pt; color: #aaaaaa;">Welcome back to Bulletin!</p>
+[config:eml_footer]
<p style="color: #dddddd; margin: 4em auto auto auto; text-align: center; font-size: x-small; font-family: sans-serif;">Copyright &copy; 2016 Bulletin Team</p>
</body>
</html>
diff --git a/inc/functions.php b/inc/functions.php
index 12bf2fc..92343f7 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -84,4 +84,15 @@ function bulletin_mail ($to, $subject, $body) {
return 0;
}
}
+
+function pwgen ($len) {
+ $alpha = 'abcdefghijklmnopqrstuvwxyz';
+ $alpha .= strtoupper($alpha);
+ $alpha .= '0123456789';
+ $pass = '';
+ $alen = strlen($alpha);
+ for ($i = 0; $i < $len; $i++)
+ $pass .= $alpha[mt_rand(0, $alen-1)];
+ return $pass;
+}
?>