Get user information in the wall if there's not an user ID

This commit is contained in:
Manuel Eduardo Cortéz Vallejo 2016-03-14 16:07:44 -06:00
parent 44079d19d2
commit e067de763a

View File

@ -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"]
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"])