- Work done on UserAccountControl
This commit is contained in:
1 parent
ed1265232b
commit
131853104d
6 files changed
+57
-4
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user