phpldapadmin/app/Ldap/Entry.php

26 lines
429 B
PHP
Raw Normal View History

<?php
namespace App\Ldap;
use LdapRecord\Models\Model;
class Entry extends Model
{
/**
* The object classes of the LDAP model.
*
* @var array
*/
public static $objectClasses = [];
2020-09-18 14:08:00 +00:00
public function rootDSE($connection = null)
{
return static::on($connection ?? (new static)->getConnectionName())
->in(null)
->read()
->select(['+'])
->whereHas('objectclass')
->firstOrFail();
}
}