Example #1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            foreach (var attr in GetType().GetCustomAttributes(typeof(PageAttribute), true))
            {
                _dosValidation = ((PageAttribute)attr).DoSValidation;
                _createUser    = ((PageAttribute)attr).CreateUser;
            }

            if (_dosValidation && !ActionValidator.ValidateRequest(IsPostBack))
            {
                Response.End();
            }

            if (!_createUser)
            {
                return;
            }

            CurrentUser = WebUser.CreateUser();
            if (!CurrentUser.bLoggedIn)
            {
                CurrentUser.LoginFromCookie();
            }
        }
Example #2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (!ActionValidator.ValidateRequest(IsPostBack))
            {
                Response.End();
            }

            CurrentUser = WebUser.CreateUser();
            if (!CurrentUser.bLoggedIn)
            {
                CurrentUser.LoginFromCookie();
            }
        }