Skip to content
Snippets Groups Projects
Commit 7362f103 authored by Robin Appelman's avatar Robin Appelman
Browse files

only use ldap user backend when it is configured

parent 53ae5609
No related branches found
No related tags found
No related merge requests found
...@@ -97,6 +97,9 @@ class OC_USER_LDAP extends OC_USER_BACKEND { ...@@ -97,6 +97,9 @@ class OC_USER_LDAP extends OC_USER_BACKEND {
return $entries[0]["dn"]; return $entries[0]["dn"];
} }
public function checkPassword( $uid, $password ) { public function checkPassword( $uid, $password ) {
if(!self::$configured){
return false;
}
$dn = $this->getDn( $uid ); $dn = $this->getDn( $uid );
if( !$dn ) if( !$dn )
return false; return false;
...@@ -105,6 +108,9 @@ class OC_USER_LDAP extends OC_USER_BACKEND { ...@@ -105,6 +108,9 @@ class OC_USER_LDAP extends OC_USER_BACKEND {
} }
public function userExists( $uid ) { public function userExists( $uid ) {
if(!self::$configured){
return false;
}
$dn = $this->getDn($uid); $dn = $this->getDn($uid);
return !empty($dn); return !empty($dn);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment