argc = switch_split(mycmd, ' ', argv);
}
- if (argc == 3) {
+ if (argc > 1) {
r = switch_xml_clear_user_cache(argv[0], argv[1], argv[2]);
} else {
r = switch_xml_clear_user_cache(NULL, NULL, NULL);
switch_snprintf(message, mlen, "Authentication Failure");
jsock->uid = NULL;
login_fire_custom_event(jsock, params, 0, "Authentication Failure");
+ switch_xml_clear_user_cache("id", id, domain);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"auth using %s\n",a1_hash ? "a1-hash" : "username & password");
r = SWITCH_TRUE;
switch_mutex_lock(CACHE_MUTEX);
+ if (key && user_name && !domain_name) {
+ domain_name = switch_core_get_variable("domain");
+ }
+
if (key && user_name && domain_name) {
switch_snprintf(mega_key, sizeof(mega_key), "%s%s%s", key, user_name, domain_name);