summaryrefslogtreecommitdiffstats
path: root/pyload/database/UserDatabase.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/database/UserDatabase.py')
-rw-r--r--pyload/database/UserDatabase.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/pyload/database/UserDatabase.py b/pyload/database/UserDatabase.py
index 8d8381a40..14b4ae40c 100644
--- a/pyload/database/UserDatabase.py
+++ b/pyload/database/UserDatabase.py
@@ -44,6 +44,14 @@ class UserMethods(DatabaseMethods):
self.c.execute('INSERT INTO users (name, password) VALUES (?, ?)', (user, password))
@queue
+ def addDebugUser(self, uid):
+ # just add a user with uid to db
+ try:
+ self.c.execute('INSERT INTO users (uid, name, password) VALUES (?, ?, ?)', (uid, "debugUser", random_salt()))
+ except:
+ pass
+
+ @queue
def getUserData(self, name=None, uid=None):
qry = ('SELECT uid, name, email, role, permission, folder, traffic, dllimit, dlquota, '
'hddquota, user, template FROM "users" WHERE ')