- Work done on UserAccountControl

This commit is contained in:
Dave Mc Nicoll committed 2025-09-17 20:28:57 +00:00
1 parent ed1265232b
commit 131853104d
6 files changed
+57 -4

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
<?php
namespace Ulmus\Ldap\Entity;
trait UserAccountControlTrait
{
public function matchAccountControl(UserAccountControlEnum $userAccountControl) : bool
{
return ($this->userAccountControl & $userAccountControl->value) === $userAccountControl->value;
}
public function isDisabled() : bool
{
return $this->matchAccountControl(UserAccountControlEnum::ACCOUNTDISABLE);
}
}