Fixed user sync removing

pull/173/head
parent fcdeedad20
commit 2563d5dde9

@ -2138,6 +2138,8 @@ void on_user_save(GtkWidget *self, dictionary *dict){
if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){ if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
yon_config_remove_by_key(USERADD_SYNC(window->old_username)); yon_config_remove_by_key(USERADD_SYNC(window->old_username));
} }
} else {
yon_config_remove_by_key(USERADD_SYNC(window->old_username));
} }
if (!yon_char_is_empty(usershadow_sync_string)){ if (!yon_char_is_empty(usershadow_sync_string)){
@ -2146,7 +2148,9 @@ void on_user_save(GtkWidget *self, dictionary *dict){
if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){ if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
yon_config_remove_by_key(USERSHADOW_SYNC(window->old_username)); yon_config_remove_by_key(USERSHADOW_SYNC(window->old_username));
} }
} } else {
yon_config_remove_by_key(USERSHADOW_SYNC(window->old_username));
}
GtkTreeIter iter; GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(widgets->UsersList); GtkTreeModel *model = GTK_TREE_MODEL(widgets->UsersList);
char *password_status=NULL; char *password_status=NULL;

Loading…
Cancel
Save