Fix how log repository functions is called on user.id