Get current user using SharePoint SPControl class.
private SPUser GetLoginUser()
{
SPUser currentUser = null;
try
{
currentUser = SPControl.GetContextWeb(Context).CurrentUser;
}
catch (Exception)
{
throw;
}
return currentUser;
}
No comments:
Post a Comment