diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-09-10 15:12:55 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2012-09-10 15:12:55 +0200 |
commit | 1a55cb6a2eb8784253410b2e93510b5bcebf7f41 (patch) | |
tree | bb5fdba66bf631df529e7ad4b58724c7386ec879 /module/Api.py | |
parent | cosmetic fixed, changed default server to threaded (diff) | |
download | pyload-1a55cb6a2eb8784253410b2e93510b5bcebf7f41.tar.xz |
userApi for plugins
Diffstat (limited to 'module/Api.py')
-rw-r--r-- | module/Api.py | 3 |
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? |