-
Notifications
You must be signed in to change notification settings - Fork 77
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
Conversation
Thanks!!! Very good! |
@@ -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']); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :)
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 :)