Fixes #13749 - Handle Base64 and binary LDAP avatars
Before this change, we would always try to Base64.decode absolutely any avatar. This resulted in broken images, as sometimes the avatars are automatically turned into binary by net/ldap. In such cases, we want to save that directly, no decoding needed.
We also had a minor bug - when a user gets its LDAP avatar updated, the old one could not be deleted. This results in broken log in. The bug was quite minor, the variable where the file was supposed to be was simply undefined.
Related issues
Bug #13749: Getting avatar from openldap seems to be broken
Fixes #13749 - Handle Base64 and binary LDAP avatars
Before this change, we would always try to Base64.decode absolutely any
avatar. This resulted in broken images, as sometimes the avatars are
automatically turned into binary by net/ldap. In such cases, we want to
save that directly, no decoding needed.
We also had a minor bug - when a user gets its LDAP avatar updated, the
old one could not be deleted. This results in broken log in. The bug
was quite minor, the variable where the file was supposed to be was
simply undefined.