fix function getFriendship in user model