summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-10 15:12:55 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-10 15:12:55 +0200
commit1a55cb6a2eb8784253410b2e93510b5bcebf7f41 (patch)
treebb5fdba66bf631df529e7ad4b58724c7386ec879 /module/Api.py
parentcosmetic fixed, changed default server to threaded (diff)
downloadpyload-1a55cb6a2eb8784253410b2e93510b5bcebf7f41.tar.xz
userApi for plugins
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/Api.py b/module/Api.py
index 182024775..dec1526b2 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -150,6 +150,9 @@ class Api(Iface):
:param uid: user or userData instance or uid
:return: :class:`UserApi`
"""
+ if isinstance(uid, User):
+ uid = uid.uid
+
if uid not in self.user_apis:
user = self.core.db.getUserData(uid=uid)
if not user: #TODO: anonymous user?