diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-06 12:05:26 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-06 12:05:26 +0100 |
commit | 392785e31a47adec0550bfeb51666fe92503f22d (patch) | |
tree | 8b87cc530c26f92c2cccebf67c857370e53687ef /module/UserDatabase.py | |
parent | webif dlc upload fix (diff) | |
download | pyload-392785e31a47adec0550bfeb51666fe92503f22d.tar.xz |
some fixes
Diffstat (limited to 'module/UserDatabase.py')
-rw-r--r-- | module/UserDatabase.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/UserDatabase.py b/module/UserDatabase.py index 471363cf9..7863e16b8 100644 --- a/module/UserDatabase.py +++ b/module/UserDatabase.py @@ -25,7 +25,7 @@ import random class UserMethods(): @style.queue def checkAuth(db, user, password): - c = db.createCursor() + c = db.c c.execute('SELECT name, password, role, permission, template FROM "users" WHERE name=?', (user, )) r = c.fetchone() if not r: @@ -43,7 +43,7 @@ class UserMethods(): h = sha1(salt + password) password = salt + h.hexdigest() - c = db.createCursor() + c = db.c c.execute('SELECT name FROM users WHERE name=?', (user, )) if c.fetchone() is not None: c.execute('UPDATE users SET password=? WHERE name=?', (password, user)) @@ -52,7 +52,7 @@ class UserMethods(): @style.queue def listUsers(db): - c = db.createCursor() + c = db.c c.execute('SELECT name FROM users') users = [] for row in c.fetchall(): @@ -61,7 +61,7 @@ class UserMethods(): @style.queue def removeUser(db, user): - c = db.createCursor() + c = db.c c.execute('SELECT name FROM users WHERE name=?', (user, )) if c.fetchone() is not None: c.execute('DELETE FROM users WHERE name=?', (user, )) |