16 lines
424 B
PHP
16 lines
424 B
PHP
<?php
|
|
|
|
namespace Ulmus\Ldap\Entity;
|
|
|
|
trait UserAccountControlTrait
|
|
{
|
|
public function matchAccountControl(UserAccountControlEnum $userAccountControl) : bool
|
|
{
|
|
return (($this->userAccountControl ?? false) & $userAccountControl->value) === $userAccountControl->value;
|
|
}
|
|
|
|
public function isDisabled() : bool
|
|
{
|
|
return $this->matchAccountControl(UserAccountControlEnum::ACCOUNTDISABLE);
|
|
}
|
|
} |