Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldap_vcard_map #297

Closed
uspen opened this issue Oct 16, 2014 · 7 comments
Closed

ldap_vcard_map #297

uspen opened this issue Oct 16, 2014 · 7 comments

Comments

@uspen
Copy link

uspen commented Oct 16, 2014

I want change default value:

{ldap_vcard_map, [
        {<<"NICKNAME">>, <<"%u">>, []},
         {<<"FN">>, <<"%s">>, [<<"displayName">>]},
         {<<"FAMILY">>, <<"%s">>, [<<"sn">>]},
         {<<"GIVEN">>, <<"%s">>, [<<"givenName">>]},
         {<<"MIDDLE">>, <<"%s">>, [<<"initials">>]},
         {<<"ORGNAME">>, <<"%s">>, [<<"o">>]},
         {<<"ORGUNIT">>, <<"%s">>, [<<"ou">>]},
         {<<"CTRY">>, <<"%s">>, [<<"c">>]},
         {<<"LOCALITY">>, <<"%s">>, [<<"l">>]},
         {<<"STREET">>, <<"%s">>, [<<"street">>]},
         {<<"REGION">>, <<"%s">>, [<<"st">>]},
         {<<"PCODE">>, <<"%s">>, [<<"postalCode">>]},
         {<<"TITLE">>, <<"%s">>, [<<"title">>]},
         {<<"URL">>, <<"%s">>, [<<"labeleduri">>]},
         {<<"DESC">>, <<"%s">>, [<<"description">>]},
         {<<"TEL">>, <<"%s">>, [<<"telephoneNumber">>]},
         {<<"EMAIL">>, <<"%s">>, [<<"mail">>]},
         {<<"BDAY">>, <<"%s">>, [<<"birthDay">>]},
         {<<"ROLE">>, <<"%s">>, [<<"employeeType">>]},
         {<<"PHOTO">>, <<"%s">>, [<<"jpegPhoto">>]}
            ]},
{<<"DESC">>, <<"%s">>, [<<"description">>]},

to

{<<"DESC">>, <<"%s">>, [<<"ipHostNumber">>]},

but server logs err:

** Option: ldap_vcard_map
** Invalid value: <SKIP>
** Using as fallback: <SKIP>

Can you help me? :-(

@sattellite
Copy link

Same problem. What is wrong? MongooseIM 1.5.0 for Ubuntu Trusty amd64 deb.

Configuration problem:
** Option: ldap_vcard_map
** Invalid value: [{"NICKNAME","%u",[]},{"GIVEN","%s",["cn"]},{"FAMILY","%s",["sn"]},{"TEL","%s",["telephoneNumber"]}]
** Using as fallback: [{<<"NICKNAME">>,<<"%u">>,[]},{<<"FN">>,<<"%s">>,[<<"displayName">>]},{<<"FAMILY">>,<<"%s">>,[<<"sn">>]},{<<"GIVEN">>,<<"%s">>,[<<"givenName">>]},{<<"MIDDLE">>,<<"%s">>,[<<"initials">>]},{<<"ORGNAME">>,<<"%s">>,[<<"o">>]},{<<"ORGUNIT">>,<<"%s">>,[<<"ou">>]},{<<"CTRY">>,<<"%s">>,[<<"c">>]},{<<"LOCALITY">>,<<"%s">>,[<<"l">>]},{<<"STREET">>,<<"%s">>,[<<"street">>]},{<<"REGION">>,<<"%s">>,[<<"st">>]},{<<"PCODE">>,<<"%s">>,[<<"postalCode">>]},{<<"TITLE">>,<<"%s">>,[<<"title">>]},{<<"URL">>,<<"%s">>,[<<"labeleduri">>]},{<<"DESC">>,<<"%s">>,[<<"description">>]},{<<"TEL">>,<<"%s">>,[<<"telephoneNumber">>]},{<<"EMAIL">>,<<"%s">>,[<<"mail">>]},{<<"BDAY">>,<<"%s">>,[<<"birthDay">>]},{<<"ROLE">>,<<"%s">>,[<<"employeeType">>]},{<<"PHOTO">>,<<"%s">>,[<<"jpegPhoto">>]}]

Configuration:

    {ldap_vcard_map, [
      {"NICKNAME", "%u", []},
      {"GIVEN",    "%s", ["cn"]},
      {"FAMILY",   "%s", ["sn"]},
      {"TEL",      "%s", ["telephoneNumber"]}
    ]}

Result is same if use double-angle brackets for VCardField, LDAPPattern and LDAPField.

@uspen
Copy link
Author

uspen commented Apr 7, 2015

Remove double-angle brackets. I "solved": I changed the source code and compile modules

erlc /usr/src/MongooseIM/apps/ejabberd/src/mod_vcard_ldap.erl
/usr/lib/mongooseim/lib/ejabberd-2.1.8+mim-<VERSION>/ebin/mod_vcard_ldap.beam

@sattellite
Copy link

This is not solved my problem.

@uspen
Copy link
Author

uspen commented Apr 21, 2015

Look. First remove ALL settings ldap_vcard_map from config. Second in file /usr/src/MongooseIM/apps/ejabberd/src/mod_vcard_ldap.erl change ldap fields as you want. Third see my comment before

@sattellite
Copy link

I already do that, but this is very ugly solution.

@michalwski
Copy link
Contributor

This will be improved in #460

@uspen
Copy link
Author

uspen commented Sep 17, 2015

Ok, Thank you!

@uspen uspen closed this as completed Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants