I come across this problem about once a year, especially when backing up and restoring DNN databases to move between hosting companies. I always end up looking up the answer on google each time. So to help me find the answer quickly 12 months from now - here's how to fix Orphaned Users in SQLServer...
sp_change_users_login @Action='update_one', @UserNamePattern='the_username', @LoginName='the_username';
...assuming the username and login are the same