[erlang-questions] eldap:search result

Thomas Elsgaard thomas.elsgaard@REDACTED
Sun Jan 12 20:41:59 CET 2014


Hi list

I am experimenting with eldap, but i am wondering on how to correctly get
the result from an ldap search?

In my module, i am doing an eldap:search

-----------------
{ok, Result} = eldap:search(S, Search),
eldap:close(S),
io:format("Search Result: ~p~n", [Result]).
-----------------

And i am getting following:

-----------------
Search Result: {eldap_search_result,
                   [{eldap_entry,
                        "blaa,blaaa,blaa,blaa,blaa",
                        [{"status",["available"]}]}],
                   []}
ok
-----------------

So far so good, eldap is doing it's work, but what i am really interrested
in is just the content of the attribute status which is "available". How
can i get the status into an variable? Do i need to get it from an record,
or ?

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140112/929c9fdb/attachment.htm>


More information about the erlang-questions mailing list