Estou recebendo o erro abaixo no log do php:
Undefined property: adLDAP::$_ad_username in E:\xampp\htdocs\ocomon\includes\classes\adLDAP.php on line 308
Segui o tutorial de integração com o AD e está funcionando. Usuário pode logar normal e tem seu login armazenado no banco do Ocomon.
Como solucionar isso?
Código da linha mencionada e adjacencias:
public function user_info($user,$fields=NULL){
if ($user!=NULL){
A linha 308 é esta abaixo
if ($this->_ad_username!=NULL){ $this->rebind(); } //bind as a another account if necessary
if ($this->_bind){ //perform the search and grab all their details
$filter="samaccountname=".$user;
if ($fields==NULL){ $fields=array("samaccountname","mail","memberof","department","displayname","telephonenumber","primarygroupid"); }
$sr=ldap_search($this->_conn,$this->_base_dn,$filter,$fields);
$entries = ldap_get_entries($this->_conn, $sr);
// AD does not return the primary group in the ldap query, we may need to fudge it
if ($this->_real_primarygroup){
$entries[0]["memberof"][]=$this->group_cn($entries[0]["primarygroupid"][0]);
} else {
$entries[0]["memberof"][]="CN=Domain Users,CN=Users,".$this->_base_dn;
}
$entries[0]["memberof"]["count"]++;
return ($entries);
}
}
return (false);
}