MOSS Question: Download Questions PDF
What is the role of SPWeb.EnsureUser method?
![MOSS Interview Answer MOSS Interview Question](https://globalguideline.com/public/images/interview/7.png)
Answer:
SPWeb.EnsureUser method validates whether the specified login name belongs to a valid user of the website or not. If the login name does not exist then it adds the login name to the website.
Eg:
Dim instance As SPWeb
Dim loginName As String
Dim returnValue As SPUser
returnValue = instance.EnsureUser(loginName)
Eg:
Dim instance As SPWeb
Dim loginName As String
Dim returnValue As SPUser
returnValue = instance.EnsureUser(loginName)
Download MOSS Interview Questions And Answers
PDF
Previous Question | Next Question |
What is the role of AllowUnsafeUpdates? | What is the difference between SPSite and SPWeb object? |