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

Lookup thumbnail photo from AD #359

Merged
merged 17 commits into from
Mar 9, 2018
Merged

Conversation

swordfischer
Copy link
Contributor

This pull request adds functionality to parse the user image stored on the AD objects.

It does require the property
$conf['plugin']['authad']['additional'] to contain 'thumbnailphoto'
and obviously the Active Directory Auth plugin :)

@giterlizzi
Copy link
Owner

Thanks!!! Very good!

@giterlizzi giterlizzi changed the base branch from master to develop March 9, 2018 10:43
@giterlizzi giterlizzi merged commit c231d86 into giterlizzi:develop Mar 9, 2018
@@ -910,6 +912,12 @@ function get_avatar( $username, $email, $size = 80, $d = 'mm', $r = 'g' ) {
return $logo;
}

if ($avatar_provider == 'activedirectory') {
$logo = "data:image/jpeg;base64," . base64_encode($INFO['userinfo']['thumbnailphoto']);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to change this to have the uppercase "P" on thumbnailphoto, after that, it's working.
$logo = "data:image/jpeg;base64," . base64_encode($INFO['userinfo']['thumbnailPhoto']);

Also had already done the $conf['plugin']['authad']['additional'] = 'department,office,thumbnailPhoto'; on local.protected.php

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on what you've written in the AD config, I guess the issue comes as Active Directory is case insensitive, but PHP is case sensitive.
I'm fine with this, don't know if there should be a disclaimer somewhere that the synced property in AD config for dokuwiki should be "thumbnailPhoto" then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants