summaryrefslogtreecommitdiffstats
path: root/module/plugins/Account.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-24 12:20:41 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-24 12:20:41 +0100
commit9538fd00584d24c871a3c6b4f47446e187348ff9 (patch)
tree0ff014bc1ef49bdaa82ebc6774761a7df2229144 /module/plugins/Account.py
parentShareOnline Premium, OronCom updates (diff)
downloadpyload-9538fd00584d24c871a3c6b4f47446e187348ff9.tar.xz
fix SO for new account manager
Diffstat (limited to 'module/plugins/Account.py')
-rw-r--r--module/plugins/Account.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py
index 9da8d0357..363af3d8b 100644
--- a/module/plugins/Account.py
+++ b/module/plugins/Account.py
@@ -72,15 +72,20 @@ class Account(Base, AccountInfo):
def init(self):
pass
+ #TODO: remove user, data
def login(self, user, data, req):
"""login into account, the cookies will be saved so user can be recognized
- :param user: loginname
- :param data: data dictionary
+ :param user: Deprecated
+ :param data: Deprecated
:param req: `Request` instance
"""
raise NotImplemented
+ def relogin(self):
+ """ Force a login, same as `_login` """
+ return self._login()
+
@lock
def _login(self):
# set timestamp for login
@@ -106,6 +111,8 @@ class Account(Base, AccountInfo):
finally:
req.close()
+ return self.valid
+
def restoreDefaults(self):
self.valid = Account.valid
self.validuntil = Account.validuntil
@@ -173,6 +180,16 @@ class Account(Base, AccountInfo):
else:
self.logDebug("Unknown attribute %s=%s" % (k, v))
+ #TODO: remove user
+ def loadAccountInfo(self, user, req):
+ """ Overwrite this method and set account attributes within this method.
+
+ :param user: Deprecated
+ :param req: Request instance
+ :return:
+ """
+ pass
+
def isPremium(self, user=None):
if user: self.logDebug("Deprecated Argument user for .isPremium()", user)
return self.premium