diff options
author | mkaay <mkaay@mkaay.de> | 2010-08-12 00:51:10 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-08-12 00:51:10 +0200 |
commit | bc12e7c71cc93bcc22f80dba15111091b4528e03 (patch) | |
tree | 96b5204ec3ba1c2db53ca809fb909f0f4518fab0 /module/plugins/Account.py | |
parent | merge (diff) | |
download | pyload-bc12e7c71cc93bcc22f80dba15111091b4528e03.tar.xz |
account plugin change, server methods for accounts
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) |