diff options
Diffstat (limited to 'module/plugins/Account.py')
-rw-r--r-- | module/plugins/Account.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py index 3b18e563f..de5fb00d6 100644 --- a/module/plugins/Account.py +++ b/module/plugins/Account.py @@ -35,12 +35,20 @@ class Account(): self.register = {} self.setAccounts(accounts) - def login(self): + def login(self, user, data): pass def setAccounts(self, accounts): self.accounts = accounts - self.login() + for user, data in self.accounts: + self.login(user, data) + + def updateAccounts(self, user, password): + self.accounts[user]["password"] if self.accounts.has_key(user) else self.accounts[user] = {"password":password} + self.login(user, self.accounts[user]) + + def removeAccount(self, user): + del self.accounts[user] def getAccountInfo(self, name): return { @@ -51,7 +59,7 @@ class Account(): } def getAllAccounts(self): - pass + return [self.getAccountInfo(user) for user, data in self.accounts.iteritems()] def getAccountRequest(self, plugin): user, data = self.getAccountData(plugin) |