It's fairly straight forward to fix up a single orphaned SQL user to a login using:
EXEC sp_change_users_login 'Auto_Fix', 'user'
I could script this, but is there an existing stored procedure which automatically tries to fix up every orphaned user in a given database?