aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/lib/userpicker.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/lib/userpicker.js b/js/lib/userpicker.js
index ece5a6951..f2c2aa53f 100644
--- a/js/lib/userpicker.js
+++ b/js/lib/userpicker.js
@@ -48,7 +48,12 @@ elgg.userpicker.addUser = function(event, ui) {
}
elgg.userpicker.removeUser = function(event) {
- $(this).closest('.elgg-user-picker-list > li').remove();
+ var item = $(this).closest('.elgg-user-picker-list > li');
+
+ var guid = item.find('[name="members[]"]').val();
+ delete elgg.userpicker.userList[guid];
+
+ item.remove();
event.preventDefault();
}