eitanblumin.com
T-SQL Script to Fix Orphaned DB Users Easily - Eitan Blumin's blog
“Orphaned Users” is a common issue in SQL Server where a Database User is no longer associated with its relevant Server Login. The symptoms that you can expect is the inability to use such database users. Specifically, using the login to connect to the database that it’s supposed to be mapped to.
Eitan Blumin