Skip to content

Commit

Permalink
Merge pull request #44056 from nextcloud/backport/44042/stable28
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv committed Mar 12, 2024
2 parents 2fea1bb + c26685a commit 7d58ae3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions apps/user_ldap/lib/Access.php
Expand Up @@ -1593,17 +1593,15 @@ public function getFilterForUserCount(): string {
return $filter;
}

/**
* @param string $name
* @param string $password
* @return bool
*/
public function areCredentialsValid($name, $password) {
public function areCredentialsValid(string $name, string $password): bool {
if ($name === '' || $password === '') {
return false;
}
$name = $this->helper->DNasBaseParameter($name);
$testConnection = clone $this->connection;
$credentials = [
'ldapAgentName' => $name,
'ldapAgentPassword' => $password
'ldapAgentPassword' => $password,
];
if (!$testConnection->setConfiguration($credentials)) {
return false;
Expand Down

0 comments on commit 7d58ae3

Please sign in to comment.