示例#1
0
        private void LoginUser(string username, string password, bool rememberLogin,
                               string preferredLocale, string theme)
        {
            // status
            int loginStatus = PortalUtils.AuthenticateUser(username, password, ipAddress,
                                                           rememberLogin, preferredLocale, theme);

            if (loginStatus < 0)
            {
                ShowWarningMessage("WrongLogin");
            }
            else if (loginStatus == BusinessSuccessCodes.SUCCESS_USER_ONETIMEPASSWORD)
            {
                // One time password should be changed after login
                Response.Redirect(EditUrl("UserID", PanelSecurity.LoggedUserId.ToString(), "change_onetimepassword", "onetimepassword=true"), true);
            }
            else
            {
                // redirect by shortcut
                ShortcutRedirect();

                // standard redirect
                Response.Redirect(RedirectUrl, true);
            }
        }
示例#2
0
        private void LoginUser(string username, string password, bool rememberLogin,
                               string preferredLocale, string theme)
        {
            // status
            int loginStatus = PortalUtils.AuthenticateUser(username, password, ipAddress,
                                                           rememberLogin, preferredLocale, theme);

            if (loginStatus < 0)
            {
                ShowWarningMessage("WrongLogin");
            }
            else
            {
                // redirect by shortcut
                ShortcutRedirect();

                // standard redirect
                Response.Redirect(RedirectUrl, true);
            }
        }