protected override void OnInit(EventArgs e)
{
// Rights.AccessAdminPages isn't needed here. If self-registration is turned
// on, we will allow a user who cannot AccessAdminPages to edit their profile.
if (!Security.IsAuthenticated)
{
Security.RedirectForUnauthorizedRequest();
return;
}
bool canEditRoles = false;
if (!CanUserEditProfile(Request.QueryString["id"], out canEditRoles))
{
Response.Redirect("Users.aspx");
return;
}
this.theId = Request.QueryString["id"];
phRoles.Visible = canEditRoles;
phRightContentBox.Visible = Security.IsAuthorizedTo(BlogEngine.Core.Rights.AccessAdminPages);
base.OnInit(e);
}