The user principal identity is now used as the JID in all XMPP protocol stanzas.
[citadel.git] / citadel / user_ops.c
index c215e734a6706940472766ac502b366385868c4d..0507fc6baca99c4132d008d1f7f32bf91414addb 100644 (file)
@@ -697,6 +697,12 @@ void do_login(void)
                AutoGenerateEmailAddressForUser(&CC->user);
        }
 
+       /* Populate the user principal identity, which is consistent and never aliased */
+       strcpy(CC->cs_principal_id, "wowowowow");
+       makeuserkey(CC->cs_principal_id, CC->user.fullname, sizeof CC->user.fullname);
+       strcat(CC->cs_principal_id, "@");
+       strcat(CC->cs_principal_id, CtdlGetConfigStr("c_fqdn"));
+
        /*
         * Populate cs_inet_email and cs_inet_other_emails with valid email addresses from the user record
         */