Issue: A user account was deleted from the active directory.
Later, we had to re-create the same account again in AD.
SharePoint showed two entries when I searched for that particular user and permissions were being assigned to the old account even though i picked both entries.
Environment: SharePoint 2013
Resolution :
Go to Site Settings-> Users and Permissions -> People and groups
http://sitecollection/sites/sitename/_layouts/15/people.aspx?MembershipGroupId=7
By changing the ‘MembershipGroupId’ to 0, we can see all the users.
http://sitecollection/sites/sitename/_layouts/15/people.aspx?MembershipGroupId=0
OR we can access this page via http://sitecollection/sites/sitename/_catalogs/users/simple.aspx
Delete the old account from this page.
Now, reassign the permissions.