diff --git a/source/ubl-settings-usergroups-user.c b/source/ubl-settings-usergroups-user.c index 6a79b90..901b90c 100644 --- a/source/ubl-settings-usergroups-user.c +++ b/source/ubl-settings-usergroups-user.c @@ -498,10 +498,10 @@ void on_user_save(GtkWidget *self, dictionary *dict){ ":",yon_char_return_if_exist(password_expiration_date,""), NULL); - final_user = yon_char_unite(yon_char_return_if_exist(username,"x"), - ":",yon_char_return_if_exist(uid_string,"x"), - ":",yon_char_return_if_exist(main_group,"x"), - ":",yon_char_return_if_exist(additional_groups,"x"), + final_user = yon_char_unite(yon_char_return_if_exist(username,""), + ":",yon_char_return_if_exist(uid_string,""), + ":",yon_char_return_if_exist(main_group,""), + ":",yon_char_return_if_exist(additional_groups,""), ":",yon_char_return_if_exist(extra_options,""), ":",yon_char_return_if_exist(password,""), NULL); @@ -511,10 +511,12 @@ void on_user_save(GtkWidget *self, dictionary *dict){ if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){ yon_config_remove_by_key(USERADD(window->old_username)); } - final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERSHADOW(login)); - yon_config_register(USERSHADOW(login),final_command,shadow_string); - if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){ - yon_config_remove_by_key(USERSHADOW(window->old_username)); + if (strcmp(window->old_password,password)){ + final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERSHADOW(login)); + yon_config_register(USERSHADOW(login),final_command,shadow_string); + if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){ + yon_config_remove_by_key(USERSHADOW(window->old_username)); + } } int home_delete = yon_char_parsed_check_exist(main_config.remove_homes,main_config.homes_size,login); if (home_delete>-1){