From 1a55cb6a2eb8784253410b2e93510b5bcebf7f41 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Mon, 10 Sep 2012 15:12:55 +0200 Subject: userApi for plugins --- module/Api.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/Api.py') 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? -- cgit v1.2.3