From: Andreas Gohr Date: Tue, 4 Sep 2007 14:41:36 +0000 (+0200) Subject: supress ldap_bind errors X-Git-Tag: 0.7.1~35 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=47b22054a954cdc50c09fa7a768fb6ad58cfab02;p=contagged supress ldap_bind errors darcs-hash:20070904144136-6e07b-e9cdde85ac2eff6e2afe544b868aaeb655af4b8b.gz --- diff --git a/inc/functions.php b/inc/functions.php index 617888d..f3b2ac0 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -67,7 +67,7 @@ function do_ldap_bind($user,$pass,$dn=""){ if(empty($dn)){ //anonymous bind to lookup users //blank binddn or blank bindpw will result in anonymous bind - if(!ldap_bind($LDAP_CON,$conf['anonbinddn'],$conf['anonbindpw'])){ + if(!@ldap_bind($LDAP_CON,$conf['anonbinddn'],$conf['anonbindpw'])){ die("can not bind for user lookup"); } @@ -89,7 +89,7 @@ function do_ldap_bind($user,$pass,$dn=""){ } //bind with dn - if(ldap_bind($LDAP_CON,$dn,$pass)){ + if(@ldap_bind($LDAP_CON,$dn,$pass)){ //bind successful -> set up session set_session($user,$pass,$dn); return true;