If/When you restore a SQL Server database your user may no longer able to connect.
This is because the mappying between the SYSLOGINS and SYSUSERS table is out of sync. Change the script below to suit your needs (Enter your database name and username) and this will resolve the problem.
USE
EXC SP_CHANGE_USERS_LOGIN ‘AutoFix’, ”