LDAP: backport basic fix from PR #1493 to fix bug #1450 in stable45
Merge pull request #1716 from owncloud/backport_pr1493

LDAP: backport basic fix from PR #1493 to fix bug #1450 in stable45