diff --git a/src/mod_admin_extra.erl b/src/mod_admin_extra.erl index f04e6a19a..fb8a5df96 100644 --- a/src/mod_admin_extra.erl +++ b/src/mod_admin_extra.erl @@ -976,8 +976,9 @@ get_vcard_content(User, Server, Data) -> JID = jlib:make_jid(User, Server, get_module_resource(Server)), IQ = #iq{type = get, xmlns = ?NS_VCARD}, IQr = Module:Function(JID, JID, IQ), - case IQr#iq.sub_el of - [A1] -> + [A1] = IQr#iq.sub_el, + case A1#xmlel.children of + [_] -> case get_vcard(Data, A1) of [false] -> throw(error_no_value_found_in_vcard); ElemList -> [xml:get_tag_cdata(Elem) || Elem <- ElemList]