summaryrefslogtreecommitdiff
path: root/tools/mmd/MmdUser.py
diff options
context:
space:
mode:
authorJogi Hofmüller <jogi@mur.at>2011-08-02 08:32:47 +0000
committerJogi Hofmüller <jogi@mur.at>2011-08-02 08:32:47 +0000
commit47f69ce0e9e24275ac74a861b0b794dcd1e73204 (patch)
treee5e8b5b22151bedbc289bc5f8c34cb37370bd282 /tools/mmd/MmdUser.py
parent- finished registration procedure (diff)
- modified/improved session handling
git-svn-id: https://svn.spreadspace.org/mur.sat@89 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'tools/mmd/MmdUser.py')
-rw-r--r--tools/mmd/MmdUser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/mmd/MmdUser.py b/tools/mmd/MmdUser.py
index c7d0ee0..db6754b 100644
--- a/tools/mmd/MmdUser.py
+++ b/tools/mmd/MmdUser.py
@@ -9,14 +9,18 @@ from MmdDb import Db
class User:
- def __init__ (self):
+ def __init__ (self, email = 'Anonymous'):
self.db = Db ()
+ self.email = email
def create (self, user_id, firstname, lastname, email, callsign, longitude, latitude, password):
password_hash = hashlib.sha1 (password).hexdigest ()
code = hashlib.sha1 ('{0}{1}{2}{3}'.format (user_id, firstname, lastname, email)).hexdigest ()
regtimeout = int (time.strftime ('%s')) + (3600 * 24)
self.db.userCreate (user_id, firstname, lastname, email, callsign, password_hash, code, regtimeout)
+ self.email = email
+ self.firstname = firstname
+ self.lastname = lastname
return code
def findPending (self, code):