From 77b1b5b4c4375d78ab8d1026f9caacd7490305ad Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 22 Feb 2024 17:36:24 +0600 Subject: [PATCH] Added functionality for 'Force change at next login' check button at user window --- source/ubl-settings-usergroups.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index dc440cc..529b412 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -1570,11 +1570,6 @@ void on_user_save(GtkWidget *self, dictionary *dict){ no_activity_days = yon_char_from_long(no_activity_days_active); } - int force_at_next_login_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userForceChangeCheck)); - if (force_at_next_login_active){ - - } - int user_shell_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userShellCombo)); if (user_shell_active>0){ user_shell = yon_char_unite(" --shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); @@ -1631,6 +1626,11 @@ void on_user_save(GtkWidget *self, dictionary *dict){ password_changed_date = yon_char_unite(yon_char_from_int(1900+tm.tm_year),"-",month,"-",day,NULL); } + int force_at_next_login_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userForceChangeCheck)); + if (force_at_next_login_active){ + password_changed_date = "0"; + } + int useradd_boot_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UseraddBootCheck)); if (useradd_boot_active){ useradd_boot = "boot";