- Some more bugfixes and added the OrganizationalUnit entity
This commit is contained in:
1 parent
8d1a310921
commit
fa806e8e0d
11 files changed
+173
-158
No files matched your search
@@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Ulmus\Ldap\Entity;
|
||||
|
||||
|
||||
class Container
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Ulmus\Ldap\Entity;
|
||||
|
||||
use Ulmus\Ldap\Entity\Field\{ Datetime };
|
||||
|
||||
/**
|
||||
* @ObjectClass('organizationalUnit')
|
||||
*/
|
||||
class OrganizationalUnit
|
||||
{
|
||||
use \Ulmus\Ldap\EntityTrait;
|
||||
|
||||
/**
|
||||
* @Id
|
||||
*/
|
||||
public string $ou;
|
||||
|
||||
/**
|
||||
* @Field
|
||||
*/
|
||||
public string $description;
|
||||
|
||||
/**
|
||||
* @Field('name' => "st")
|
||||
*/
|
||||
public string $state;
|
||||
|
||||
/**
|
||||
* @Field('name' => 'physicalDeliveryOfficeName')
|
||||
*/
|
||||
public string $officeName;
|
||||
|
||||
/**
|
||||
* @Field('name' => 'postalAddress')
|
||||
*/
|
||||
public string $address;
|
||||
|
||||
/**
|
||||
* @Field
|
||||
*/
|
||||
public string $postalCode;
|
||||
|
||||
/**
|
||||
* @Field
|
||||
*/
|
||||
public string $telephoneNumber;
|
||||
|
||||
public function __toString() : string
|
||||
{
|
||||
return $this->ou;
|
||||
}
|
||||
}
|
||||
+4
-1
@@ -4,6 +4,9 @@ namespace Ulmus\Ldap\Entity;
|
||||
|
||||
use Ulmus\Ldap\Entity\Field\{ Datetime };
|
||||
|
||||
/**
|
||||
* @ObjectClass('user')
|
||||
*/
|
||||
class User
|
||||
{
|
||||
use \Ulmus\Ldap\EntityTrait;
|
||||
@@ -125,6 +128,6 @@ class User
|
||||
|
||||
public function __toString() : string
|
||||
{
|
||||
return $this->displayName;
|
||||
return implode(' ', array_filter([ $this->firstname ?? "", $this->lastname ?? "" ])) ?: $this->displayName;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user