Various fixes to SSO services, including transaction handling and correct DbService handling

This commit is contained in:
2010-11-29 11:59:14 +00:00
parent dc372cd3f2
commit 47eb996c63
7 changed files with 15 additions and 31 deletions

View File

@@ -43,7 +43,6 @@ class POSTrackerService(BaseDBService):
allianceid = 0
self.dbcursor.execute(self.SQL_ADD_USER, [eveid, username, "%s%s" % (salt, pwhash) , email, corpname, allianceid])
transaction.set_dirty()
return { 'username': username, 'password': password }
def check_user(self, username):
@@ -57,20 +56,17 @@ class POSTrackerService(BaseDBService):
def delete_user(self, uid):
""" Delete a user """
self.dbcursor.execute(self.SQL_DEL_USER, [uid])
transaction.set_dirty()
return True
def disable_user(self, uid):
""" Disable a user """
self.dbcursor.execute(self.SQL_DIS_USER, [uid])
transaction.set_dirty()
return True
def enable_user(self, uid, password):
""" Enable a user """
pwhash, salt = self._gen_pwhash(password)
self.dbcursor.execute(self.SQL_ENABLE_USER, ["%s%s" % (salt, pwhash), uid])
transaction.set_dirty()
return True
def reset_password(self, uid, password):