textclient: don't prompt to change internet email addresses when deleting a user
authorArt Cancro <ajc@citadel.org>
Tue, 5 Sep 2023 22:09:38 +0000 (18:09 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 5 Sep 2023 22:09:38 +0000 (18:09 -0400)
The 'edit user' and 'delete user' workflows run through the same function since
the process of deleting a user simply edits them and changes their access level
to 0.  Add a check for cmd==25 (edit user) before asking the user if they want
to change the email addresses.

textclient/routines.c

index 3a04cbe7c15d16bed2a3313a0e29c7d269077b04..d74c80e6cad47e2da1f40b572fd8b69956912c9b 100644 (file)
@@ -237,8 +237,10 @@ void edituser(CtdlIPC * ipc, int cmd) {
        }
        free(user);
 
-       if (boolprompt("Edit this user's Internet email addresses", 0)) {
-               edit_user_internet_email_addresses(ipc, who);
+       if (cmd == 25) {        // user edit
+               if (boolprompt("Edit this user's Internet email addresses", 0)) {
+                       edit_user_internet_email_addresses(ipc, who);
+               }
        }
 
 }