'Since this mixin can be used both for profile and user_id models'

def get_user_id(self):

    if hasattr(self, u'user_id'):
        user_id = self.user_id
    else:
        user_id = self.id
    return user_id
