Skip to content

Commit

Permalink
Merge SharePoint 2010 FBA Pack Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoulson committed Jan 22, 2015
1 parent 1d08691 commit ecad2a7
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,27 @@ protected override void CreateChildControls()
}
}

MembershipSettings setting = null;

string changePasswordPage = "";

SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(SPContext.Current.Site.ID, SPContext.Current.Site.Zone))
{
setting = new MembershipSettings(site.RootWeb);
MembershipSettings setting = new MembershipSettings(site.RootWeb);

if (setting == null || string.IsNullOrEmpty(setting.ChangePasswordPage))
return;

changePasswordPage = setting.ChangePasswordPage;
}
});

if (setting == null || string.IsNullOrEmpty(setting.ChangePasswordPage))
return;


// generate return url
string source = SPUtility.OriginalServerRelativeRequestUrl;
string target = Utils.GetAbsoluteURL(SPContext.Current.Web, setting.ChangePasswordPage);
string target = Utils.GetAbsoluteURL(SPContext.Current.Web, changePasswordPage);

MenuItemTemplate changePasswordItem = new MenuItemTemplate();
changePasswordItem.Text = LocalizedString.GetString("FBAPackMenus", "FBAChangePassword_Title");
Expand Down

0 comments on commit ecad2a7

Please sign in to comment.