What does SPWeb.EnsureUser method do?

SPWeb.EnsureUser method checks whether user is a valid user of the site or not. It checks user login name in Active Directory. If the user is valid, it adds the user to the site.

© 2019 Code SharePoint