Fixed user object passed to database as object