Fix all compile errors for new user db framework