Admin.Users.ProfilePage.OnInit C# (CSharp) Метод

OnInit() защищенный Метод

Raises the E:System.Web.UI.Control.Init event to initialize the page.
protected OnInit ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
Результат void
        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);
        }