forked from swampxiix/acvaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Login_Lookup.py
25 lines (18 loc) · 844 Bytes
/
Login_Lookup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from Template_Main import Template_Main
from z_account import get_user_acct, reset_password
class Login_Lookup (Template_Main):
def writeContent(self):
wr = self.writeln
req = self.request()
form = req.fields()
if self.request()._environ.get('REQUEST_METHOD') == 'POST':
username = form.get('username')
p = get_user_acct(username)
email = p.get('email')
if email:
reset_password(username)
wr('<h1>Please Check Your Email</h1>')
wr('<P>You should receive a new message from us with your account\'s new password.</P>')
wr('<P>If not, then something\'s gone wrong; please contact an ACVAA site administrator.</P>')
else:
wr('<h1>You do not have permission to access this page.</h1>')