- QueryFragmentInterface fixes
This commit is contained in:
1 parent
ccd1eaef2b
commit
4b9a162696
5 files changed
+86
-19
No files matched your search
+34
-2
@@ -61,9 +61,12 @@ class User
|
||||
#[Field]
|
||||
public string $title;
|
||||
|
||||
##[Virtual]
|
||||
##[Field(readonly:true)]
|
||||
# public ? array $memberOf;
|
||||
|
||||
##[Field(readonly:true)]
|
||||
#public ? array $proxyAddresses;
|
||||
|
||||
#[Field]
|
||||
public int $userAccountControl;
|
||||
|
||||
@@ -132,7 +135,13 @@ class User
|
||||
|
||||
#[Field(name: "lastLogon", readonly: true)]
|
||||
public LdapDatetime $lastLogon;
|
||||
|
||||
|
||||
#[Field(name: "whenCreated", readonly: true)]
|
||||
public LdapDatetime $whenCreated;
|
||||
|
||||
#[Field(name: "whenChanged", readonly: true)]
|
||||
public LdapDatetime $whenChanged;
|
||||
|
||||
public function __toString() : string
|
||||
{
|
||||
return implode(' ', array_filter([ $this->firstname ?? "", $this->lastname ?? "" ])) ?: ( $this->displayName ?? "" );
|
||||
@@ -145,4 +154,27 @@ class User
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function brokenMigration() : bool
|
||||
{
|
||||
if ( empty($this->targetAddress) ) {
|
||||
foreach($this->proxyAddresses ?? [] as $proxy) {
|
||||
if ( str_contains(strtolower($proxy), 'x500') ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function migrated() : bool
|
||||
{
|
||||
return ! empty($this->targetAddress);
|
||||
}
|
||||
|
||||
public function unmigrated() : bool
|
||||
{
|
||||
return empty($this->targetAddress) && empty($this->proxyAddresses);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user