You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.
After upgrading to Adldap2 Version: 10.3 from 7.0 the search query does not return User Model Instance instead it is returning Entry Model instance. Because of this, I'm not able to retrieve the getObjectGuid() In v7.0 the same code was working fine.
I have also checked the documentation but did not find any solution.
Steps To Reproduce:
private function updateAllUsers() {
$this->connect();
$this->out("\tRetrieving all users...");
$search = $this->ldap->search();
$paginator = $search->in('dc=testldap,dc=com')->rawFilter("(&(objectclass=inetOrgPerson)(objectclass=inetorgperson))")->select(['*','entryuuid'])->paginate(900, 1);
$results = $paginator->getResults();
if(count($results) == 0) {
$this->out("\tNo users found! Perhaps your query is wrong?");
return;
}
$this->out("\tGot ".count($results). " users");
foreach($results as $result) {
$sid = $result->getObjectGuid();
if(empty($sid)) {
$this->out("\t\tERROR User is missing ".$this->config['externalidattr']." attribute! Cant continue!!");
continue;
}
}
}
Moving from version 7-10 is a huge jump in major versions. Have you configured your connection to use the OpenLDAP schema?
Also, I would heavily recommend moving to LdapRecord. I can support you with that project and it has much better documentation and feature set. I hope I see you over there!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description:
After upgrading to Adldap2 Version: 10.3 from 7.0 the search query does not return User Model Instance instead it is returning Entry Model instance. Because of this, I'm not able to retrieve the getObjectGuid() In v7.0 the same code was working fine.
I have also checked the documentation but did not find any solution.
Steps To Reproduce:
Output
The text was updated successfully, but these errors were encountered: