From a20c556fb79f3de2d3c00db89e6c418829f24e36 Mon Sep 17 00:00:00 2001
From: Anthony Minessale <anthm@freeswitch.org>
Date: Mon, 8 Oct 2012 16:34:39 -0500
Subject: [PATCH] FS-4650 --resolve

---
 src/mod/applications/mod_commands/mod_commands.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c
index 5923860507..7287d95acc 100644
--- a/src/mod/applications/mod_commands/mod_commands.c
+++ b/src/mod/applications/mod_commands/mod_commands.c
@@ -285,7 +285,7 @@ SWITCH_STANDARD_API(list_users_function)
 	int32_t arg = 0;
 	switch_xml_t xml_root, x_domains, x_domain_tag;
 	switch_xml_t gts, gt, uts, ut;
-	char *_user = NULL, *_domain = NULL, *_group = NULL;
+	char *_user = NULL, *_domain = NULL, *_search_context = NULL, *_group = NULL;
 
 
 	if ((pdata = strdup(cmd))) {
@@ -300,10 +300,12 @@ SWITCH_STANDARD_API(list_users_function)
 			if (!strcasecmp(argv[arg], "user")) {
 				_user = argv[arg + 1];
 			}
+			if (!strcasecmp(argv[arg], "context")) {
+				_search_context = argv[arg + 1];
+			}
 			if (!strcasecmp(argv[arg], "domain")) {
 				_domain = argv[arg + 1];
 			}
-
 			if (!strcasecmp(argv[arg], "group")) {
 				_group = argv[arg + 1];
 			}
@@ -370,6 +372,7 @@ SWITCH_STANDARD_API(list_users_function)
 							us.x_user_tag = ut;
 							us.x_domain_tag = x_domain_tag;
 							us.stream = stream;
+							us.search_context = _search_context;
 							dump_user(&us);
 						}
 					}
@@ -383,6 +386,7 @@ SWITCH_STANDARD_API(list_users_function)
 						us.x_user_tag = ut;
 						us.x_domain_tag = x_domain_tag;
 						us.stream = stream;
+						us.search_context = _search_context;
 						dump_user(&us);
 					}
 				}