From e067de763aeca32f22c8f9862133c32649add7ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Eduardo=20Cort=C3=A9z=20Vallejo?= Date: Mon, 14 Mar 2016 16:07:44 -0600 Subject: [PATCH] Get user information in the wall if there's not an user ID --- src/sessionmanager/session.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sessionmanager/session.py b/src/sessionmanager/session.py index 6d7259f..bc837f3 100644 --- a/src/sessionmanager/session.py +++ b/src/sessionmanager/session.py @@ -240,4 +240,6 @@ class vkSession(object): self.db["groups"][i["id"]] = i["name"] def get_my_data(self): - self.user_id = self.vk.client.users.get(fields="uid")[0]["id"] \ No newline at end of file + user = self.vk.client.users.get(fields="uid, first_name, last_name") + self.user_id = user[0]["id"] + self.db["users"][self.user_id] = u"{0} {1}".format(user[0]["first_name"], user[0]["last_name"])