FormsAuthentication.RedirectFromLoginPage(txtUserName.Text.Trim(), false);
string strUserUrl = "";
SPSecurity.RunWithElevatedPrivileges(delegate
{
SPSite oSite = SPContext.Current.Site;
SPWebCollection collWebs = oSite.OpenWeb().GetSubwebsForCurrentUser();
foreach (SPWeb oWebsite in collWebs)
{
SPUserCollection collUsers = oWebsite.AllUsers;
foreach (SPUser oUser in collUsers)
{
if (oUser.LoginName.ToUpper() == txtUserName.Text.Trim().ToUpper())
{
strUserUrl = oWebsite.ServerRelativeUrl.ToString();
}
}
oWebsite.Dispose();
}
});
Response.Redirect("http://portal/"+strUserUrl,true);
Subscribe to:
Post Comments (Atom)
SonarQube with Jenkins Setup using Docker Images
https://funnelgarden.com/sonarqube-jenkins-docker/ https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...
-
The competitive examination for the Indian Forest Service is conducted by Union Public Service Commission (UPSC). IFS exam is conducted ann...
-
Happy New Year. May this year is the year for your dreams, passions, everything you believe, your wishes, your desires, your thoughts, your ...
-
Azure Mobile App Service provides services that allow you to support mobile apps across multiple platforms. It does not provide hosting ser...
No comments:
Post a Comment