} else if (switch_true(jsock->profile->userauth)) {
id = switch_core_strdup(jsock->pool, login);
- if ((domain = strchr(id, '@'))) {
+ if (jsock->profile->chop_domain && (domain = strchr(id, '@'))) {
*domain++ = '\0';
}
-
+
}
if (jsock->profile->register_domain) {
profile->mcast_sub.sock = KS_SOCK_INVALID;
profile->mcast_pub.sock = KS_SOCK_INVALID;
-
+ profile->chop_domain = SWITCH_TRUE;
for (param = switch_xml_child(xprofile, "param"); param; param = param->next) {
char *var = NULL;
profile->blind_reg = switch_true(val);
} else if (!strcasecmp(var, "userauth") && !zstr(val)) {
profile->userauth = switch_core_strdup(profile->pool, val);
+ } else if (!strcasecmp(var, "chop-domain") && !zstr(val)) {
+ profile->chop_domain = switch_true(val);
} else if (!strcasecmp(var, "root-password") && !zstr(val)) {
profile->root_passwd = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "send-auth-password") && !zstr(val)) {