Mapping user image in LDAP

Mapping user image in LDAP

ni Deepak Gupta -
Number of replies: 6

I have the user's image in LDAP. But when I go to LDAP settings in order to map the user's image field, I don't see any such field available. How can it be done?

Thanks,
Deepak

 

Average of ratings: -
In reply to Deepak Gupta

Re: Mapping user image in LDAP

ni Iñaki Arenaza -
Larawan ng Core developers Larawan ng Documentation writers Larawan ng Particularly helpful Moodlers Larawan ng Peer reviewers Larawan ng Plugin developers

I'm afraid that is not possible with current implementation of the LDAP code.

Saludos.
Iñaki.

In reply to Iñaki Arenaza

Re: Mapping user image in LDAP

ni Deepak Gupta -

Can't we do through Custom fields or so?

In reply to Deepak Gupta

Re: Mapping user image in LDAP

ni Iñaki Arenaza -
Larawan ng Core developers Larawan ng Documentation writers Larawan ng Particularly helpful Moodlers Larawan ng Peer reviewers Larawan ng Plugin developers
I'm afraid the same code base is used in both cases (LDAP auth code). The problem is current code can only handle LDAP attributes that contain strings (i.e., scalar text values). So images, structured fields (multivalue fields), etc. are not dealt with.

Someone would need to add support for all of that.

Saludos.
Iñaki.
In reply to Iñaki Arenaza

Re: Mapping user image in LDAP

ni Deepak Gupta -

Hi Inaki,

I was looking for a way to configure 2-3 different instances of LDAP.

Is it possible?

I was going through your threads - https://moodle.org/mod/forum/discuss.php?d=74279, but not sure what is the error.

 

2 out of 45 hunks FAILED -- saving rejects to file auth/ldap/auth.php.rej
patching file auth/ldap/cli/sync_users.php
Hunk #1 FAILED at 50.
1 out of 1 hunk FAILED -- saving rejects to file auth/ldap/cli/sync_users.php.rej
patching file auth/ldap/config.html
Hunk #1 FAILED at 101.
Hunk #2 FAILED at 130.
Hunk #3 succeeded at 250 (offset 49 lines).
Hunk #4 succeeded at 290 (offset 49 lines).
Hunk #5 succeeded at 371 (offset 49 lines).
Hunk #6 succeeded at 383 (offset 49 lines).
Hunk #7 succeeded at 400 (offset 49 lines).
Hunk #8 succeeded at 417 (offset 49 lines).
Hunk #9 succeeded at 474 (offset 49 lines).
Hunk #10 succeeded at 485 (offset 49 lines).
Hunk #11 succeeded at 502 (offset 49 lines).
Hunk #12 FAILED at 487.
Hunk #13 FAILED at 536.

 

In reply to Iñaki Arenaza

Re: Mapping user image in LDAP

ni Deepak Gupta -

I was using the version ldap-clones-patch-scriptv5_2.3+ of your patch on my 2.6.1 install. What could have went wrong?

Thanks,
Deepak

 

 

In reply to Deepak Gupta

Re: Mapping user image in LDAP

ni Iñaki Arenaza -
Larawan ng Core developers Larawan ng Documentation writers Larawan ng Particularly helpful Moodlers Larawan ng Peer reviewers Larawan ng Plugin developers
That version of the patch is for Moodle 2.3.x,so it won't cleanly apply on 2.6.x You need to use a version of the patch whose filename includes the string _26+ at the end.

Saludos.
Iñaki.