| 295 | def deleteUser(self, userid) : |
| 296 | """Completely deletes an user from the Quota Storage.""" |
| 297 | queries = [] |
| 298 | queries.append("DELETE FROM groupsmembers WHERE userid=%s" % self.doQuote(userid)) |
| 299 | queries.append("DELETE FROM jobhistory WHERE userid=%s" % self.doQuote(userid)) |
| 300 | queries.append("DELETE FROM userpquota WHERE userid=%s" % self.doQuote(userid)) |
| 301 | queries.append("DELETE FROM users WHERE id=%s" % self.doQuote(userid)) |
| 302 | # TODO : What should we do if we delete the last person who used a given printer ? |
| 303 | self.doQuery(queries) |
| 304 | |
| 305 | def deleteGroup(self, groupid) : |
| 306 | """Completely deletes an user from the Quota Storage.""" |
| 307 | queries = [] |
| 308 | queries.append("DELETE FROM groupsmembers WHERE groupid=%s" % self.doQuote(groupid)) |
| 309 | queries.append("DELETE FROM grouppquota WHERE groupid=%s" % self.doQuote(groupid)) |
| 310 | queries.append("DELETE FROM groups WHERE id=%s" % self.doQuote(groupid)) |
| 311 | self.doQuery(queries) |
| 312 | |