def get_user_by_email(self, email): self.user = User.objects(email=email).first() return self.user
def get_users(self, id_list): return User.objects(uid__in=id_list).select_related()
def get_user_by_uid(self, uid): if self.user: return self.user return User.objects(uid=uid).first()