New utility function convert_spaces_to_underscores()
[citadel.git] / citadel / user_ops.c
index 3fd6b4a8536ab6ddd2511e2dcb7787aab7a0e78b..85f21d69503095bd661dbd34a46562fac5d06afc 100644 (file)
@@ -590,11 +590,7 @@ void session_startup(void)
         */
        snprintf(CC->cs_inet_email, sizeof CC->cs_inet_email, "%s@%s",
                CC->user.fullname, config.c_fqdn);
-       for (i=0; !IsEmptyStr(&CC->cs_inet_email[i]); ++i) {
-               if (isspace(CC->cs_inet_email[i])) {
-                       CC->cs_inet_email[i] = '_';
-               }
-       }
+       convert_spaces_to_underscores(CC->cs_inet_email);
 
        /* Create any personal rooms required by the system.
         * (Technically, MAILROOM should be there already, but just in case...)