- Updated to match Notes-2.x
This commit is contained in:
1 parent
4b9a162696
commit
5cd0d13404
14 files changed
+243
-70
No files matched your search
+8
-3
@@ -61,8 +61,8 @@ class User
|
||||
#[Field]
|
||||
public string $title;
|
||||
|
||||
##[Field(readonly:true)]
|
||||
# public ? array $memberOf;
|
||||
#[Field(readonly:true)]
|
||||
public ? array $memberOf;
|
||||
|
||||
##[Field(readonly:true)]
|
||||
#public ? array $proxyAddresses;
|
||||
@@ -149,12 +149,17 @@ class User
|
||||
|
||||
public function memberOfGroup() : array
|
||||
{
|
||||
$arr = array_map(fn($e) => explode('=', explode(',', $e)[0])[1], $this->memberOf);
|
||||
$arr = array_map(fn($e) => explode('=', explode(',', $e)[0])[1], (array) $this->memberOf);
|
||||
usort($arr, 'strcasecmp');
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function isMemberOf(string $name) : bool
|
||||
{
|
||||
return in_array(strtolower($name), array_map('strtolower', $this->memberOfGroup()), true);
|
||||
}
|
||||
|
||||
public function brokenMigration() : bool
|
||||
{
|
||||
if ( empty($this->targetAddress) ) {
|
||||
|
||||
Reference in new issue
Block a user