Skip to content

Commit

Permalink
Merge pull request #22880 from owncloud/fix-21656
Browse files Browse the repository at this point in the history
improve log output when no LDAP user was found on login attempt
  • Loading branch information
DeepDiver1975 committed Mar 7, 2016
2 parents d43d95e + 5d3183a commit 0487b54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/user_ldap/lib/connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
* magic properties (incomplete)
* responsible for LDAP connections in context with the provided configuration
*
* @property string ldapHost
* @property string ldapPort holds the port number
* @property string ldapUserFilter
* @property string ldapUserDisplayName
* @property string ldapUserDisplayName2
Expand Down
3 changes: 2 additions & 1 deletion apps/user_ldap/user_ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public function getLDAPUserByLoginName($loginName) {
$attrs = $this->access->userManager->getAttributes();
$users = $this->access->fetchUsersByLoginName($loginName, $attrs, 1);
if(count($users) < 1) {
throw new \Exception('No user available for the given login name.');
throw new \Exception('No user available for the given login name on ' .
$this->access->connection->ldapHost . ':' . $this->access->connection->ldapPort);
}
return $users[0];
}
Expand Down

0 comments on commit 0487b54

Please sign in to comment.