/// <summary> /// PasswordUpdated runs when the password is updated /// </summary> /// <history> /// [cnurse] 03/15/2006 Created /// </history> protected void PasswordUpdated(object sender, Password.PasswordUpdatedEventArgs e) { PasswordUpdateStatus status = e.UpdateStatus; if (status == PasswordUpdateStatus.Success) { AddModuleMessage("PasswordChanged", ModuleMessageType.GreenSuccess, true); //Authorize User UserInfo _User = ctlPassword.User; _User.Membership.LastPasswordChangeDate = DateTime.Now; _User.Membership.UpdatePassword = false; UserAuthorized(_User, true); } else { AddModuleMessage(status.ToString(), ModuleMessageType.RedError, true); } }
/// <summary> /// PasswordUpdated runs when the password is updated /// </summary> /// <remarks> /// </remarks> /// <history> /// [cnurse] 03/15/2006 Created /// </history> protected void PasswordUpdated(object sender, Password.PasswordUpdatedEventArgs e) { PasswordUpdateStatus status = e.UpdateStatus; if (status == PasswordUpdateStatus.Success) { AddModuleMessage("PasswordChanged", ModuleMessage.ModuleMessageType.GreenSuccess, true); var user = ctlPassword.User; user.Membership.LastPasswordChangeDate = DateTime.Now; user.Membership.UpdatePassword = false; LoginStatus = user.IsSuperUser ? UserLoginStatus.LOGIN_SUPERUSER : UserLoginStatus.LOGIN_SUCCESS; UserLoginStatus userstatus = UserLoginStatus.LOGIN_FAILURE; UserController.CheckInsecurePassword(user.Username, user.Membership.Password, ref userstatus); LoginStatus = userstatus; ValidateUser(user, true); } else { AddModuleMessage(status.ToString(), ModuleMessage.ModuleMessageType.RedError, true); } }