- A lot of work done to stabilize implemented features ; still a lot of thing to be done!

This commit is contained in:
Dave Mc Nicoll committed 2021-11-24 16:41:03 +00:00
1 parent a0363ebb71
commit b681f245c0
8 files changed
+193 -18

No files matched your search

+85 -7
View File
@@ -2,7 +2,7 @@
namespace Ulmus\Ldap\Entity;
use Ulmus\Ldap\Entity\Field\{ Datetime };
use Ulmus\Ldap\Entity\Field\{ Datetime, LdapDatetime };
/**
* @ObjectClass('user')
@@ -81,6 +81,11 @@ class User
*/
public string $title;
/**
* @Field('readonly' => true)
*/
public ? array $memberOf;
/**
* @Field
*/
@@ -106,6 +111,61 @@ class User
*/
public string $extensionAttribute4;
/**
* @Field
*/
public string $extensionAttribute5;
/**
* @Field
*/
public string $extensionAttribute6;
/**
* @Field
*/
public string $extensionAttribute7;
/**
* @Field
*/
public string $extensionAttribute8;
/**
* @Field
*/
public string $extensionAttribute9;
/**
* @Field
*/
public string $extensionAttribute10;
/**
* @Field
*/
public string $extensionAttribute11;
/**
* @Field
*/
public string $extensionAttribute12;
/**
* @Field
*/
public string $extensionAttribute13;
/**
* @Field
*/
public string $extensionAttribute14;
/**
* @Field
*/
public string $extensionAttribute15;
/**
* @Field
*/
@@ -124,20 +184,38 @@ class User
/**
* @Field
*/
public Datetime $lastLogonDate;
public string $scriptPath;
/**
* #Field('name' => 'createTimeStamp')
* @Field
*/
# public Datetime $createdAt;
public string $sid;
/**
* #Field('name' => 'modifyTimeStamp')
* @Field('name' => "lastLogon", 'readonly' => true)
*/
# public Datetime $updatedAt;
public LdapDatetime $lastLogon;
/**
* @Field('name' => "whenChanged", 'readonly' => true)
* /
public LdapDatetime $updatedAt;
/**
* @Field('name' => "whenCreated", 'readonly' => true)
* /
public LdapDatetime $createdAt; */
public function __toString() : string
{
return implode(' ', array_filter([ $this->firstname ?? "", $this->lastname ?? "" ])) ?: $this->displayName;
return implode(' ', array_filter([ $this->firstname ?? "", $this->lastname ?? "" ])) ?: ( $this->displayName ?? "" );
}
public function memberOfGroup() : array
{
$arr = array_map(fn($e) => explode('=', explode(',', $e)[0])[1], $this->memberOf);
usort($arr, 'strcasecmp');
return $arr;
}
}