Hi,
Here we will write sharepoint 2013 object model code to retrieve current user email id.
Use the following code.
string strUserName = HttpContext.Current.User.Identity.Name.ToString();
string strEmail = SPContext.Current.Web.AllUsers[strUserName].Email;
First we will retrieve the user name and then we will retrieve the email id.
No comments:
Post a Comment