|
|
|
|
@ -1484,18 +1484,33 @@ void on_user_save(GtkWidget *self, dictionary *dict){
|
|
|
|
|
":",yon_char_return_if_exist(password,"x"),
|
|
|
|
|
":",yon_char_return_if_exist(extra_options,""),
|
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
|
|
yon_config_register(USERADD(login),"users",final_user);
|
|
|
|
|
if (yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
|
|
|
|
|
yon_config_remove_by_key(USERADD(window->old_username));
|
|
|
|
|
}
|
|
|
|
|
yon_config_register(USERSHADOW(login),"users",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){
|
|
|
|
|
yon_char_parsed_rip(main_config.remove_homes,&main_config.homes_size,home_delete);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(useradd_sync_string))
|
|
|
|
|
if (!yon_char_is_empty(useradd_sync_string)){
|
|
|
|
|
yon_config_register(USERADD_SYNC(login),"users",useradd_sync_string);
|
|
|
|
|
if (yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
|
|
|
|
|
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)){
|
|
|
|
|
yon_config_register(USERSHADOW_SYNC(login),"users",usershadow_sync_string);
|
|
|
|
|
if (yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
|
|
|
|
|
yon_config_remove_by_key(USERSHADOW_SYNC(window->old_username));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
GtkTreeModel *model = GTK_TREE_MODEL(widgets->UsersList);
|
|
|
|
|
char *password_status=NULL;
|
|
|
|
|
@ -1640,6 +1655,7 @@ ubl_settings_usergroups_user_window *yon_ubl_settings_usergroups_user_new(){
|
|
|
|
|
yon_char_parsed_free(shells,shell_size);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userShellCombo),0);
|
|
|
|
|
window->old_password=NULL;
|
|
|
|
|
window->old_username=NULL;
|
|
|
|
|
dictionary *entry_dict = NULL;
|
|
|
|
|
yon_window_config_custom_window_setup(GTK_WINDOW(window->CreateUserWindow),"UserWindow");
|
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(entry_dict,"combo",window->userPasswordCombo);
|
|
|
|
|
@ -1739,6 +1755,7 @@ void on_main_edit(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userLoginEntry), name);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry), name);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(window->userUserNameEntry), parsed_size>0?parameters[0]:"");
|
|
|
|
|
window->old_username=name;
|
|
|
|
|
if (parsed_size>1){
|
|
|
|
|
if (strcmp(parameters[1],"x")){
|
|
|
|
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0);
|
|
|
|
|
|