Changed uid to id in user model