Esempio n. 1
0
 /// <summary>
 /// Changes the cookie level
 /// </summary>
 /// <param name="newLevel">New cookie level to set</param>
 private static void ChangeLevel(int newLevel)
 {
     if (PortalContext.ViewMode.IsLiveSite())
     {
         CookieHelper.ChangeCookieLevel(newLevel);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Changes the cookie level
 /// </summary>
 /// <param name="newLevel">New cookie level to set</param>
 private static void ChangeLevel(int newLevel)
 {
     if (CMSContext.ViewMode == ViewModeEnum.LiveSite)
     {
         CookieHelper.ChangeCookieLevel(newLevel);
     }
 }
Esempio n. 3
0
    private void Login1_LoggingIn(object sender, LoginCancelEventArgs e)
    {
        // Ensure all cookies
        if (CookieHelper.CurrentCookieLevel <= CookieLevel.All)
        {
            CookieHelper.ChangeCookieLevel(CookieLevel.All);
        }

        Login1.RememberMeSet = ((CMSCheckBox)Login1.FindControl("chkRememberMe")).Checked;
    }
Esempio n. 4
0
    private void Login1_LoggingIn(object sender, LoginCancelEventArgs e)
    {
        // Ensure all cookies
        if (CookieHelper.CurrentCookieLevel <= CookieLevel.All)
        {
            CookieHelper.ChangeCookieLevel(CookieLevel.All);
        }

        // Ban IP addresses which are blocked for login
        if ((CMSContext.CurrentSite != null) && !BannedIPInfoProvider.IsAllowed(CMSContext.CurrentSiteName, BanControlEnum.Login))
        {
            e.Cancel = true;

            if (FailureLabel != null)
            {
                FailureLabel.Visible = true;
                FailureLabel.Text    = GetString("banip.ipisbannedlogin");
            }
        }

        Login1.RememberMeSet = ((CheckBox)Login1.FindControl("chkRememberMe")).Checked;
    }