WindowsManagedGroupsNotifyJob
extends PasswordExpirationJob
in package
Job to notify users about their managed groups.
Table of Contents
- MANAGED_GROUPS = 'LAM_MANAGED_GROUPS'
- PERIOD_HALF_YEARLY = 'HALF_YEARLY'
- PERIOD_MONTHLY = 'MONTHLY'
- PERIOD_QUARTERLY = 'QUARTERLY'
- PERIOD_YEARLY = 'YEARLY'
- checkConfigOptions() : array<string|int, mixed>
- {@inheritDoc}
- execute() : void
- {@inheritDoc}
- getAlias() : string
- {@inheritDoc}
- getConfigOptions() : htmlResponsiveRow
- {@inheritDoc}
- getDescription() : string
- {@inheritDoc}
- getLastEffectiveExecutionDate() : DateTime
- Returns the last effective execution date.
- checkSingleUser() : void
- {@inheritDoc}
- findUsers() : array<string|int, mixed>
- {@inheritDoc}
- getPolicyOptions() : array<string|int, mixed>
- formatGroups() : string
- Formats the managed groups.
- getBaseDate() : DateTime
- Returns the base date (first of month) for the current date.
- getMonthInterval() : int
- Returns the month interval.
- shouldRun() : bool
- Returns if the job should run.
Constants
MANAGED_GROUPS
private
mixed
MANAGED_GROUPS
= 'LAM_MANAGED_GROUPS'
PERIOD_HALF_YEARLY
private
mixed
PERIOD_HALF_YEARLY
= 'HALF_YEARLY'
PERIOD_MONTHLY
private
mixed
PERIOD_MONTHLY
= 'MONTHLY'
PERIOD_QUARTERLY
private
mixed
PERIOD_QUARTERLY
= 'QUARTERLY'
PERIOD_YEARLY
private
mixed
PERIOD_YEARLY
= 'YEARLY'
Methods
checkConfigOptions()
{@inheritDoc}
public
checkConfigOptions(string $jobID, array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $jobID : string
- $options : array<string|int, mixed>
Return values
array<string|int, mixed> —execute()
{@inheritDoc}
public
execute(string $jobID, array<string|int, mixed> $options, PDO $pdo, bool $isDryRun, JobResultLog $resultLog) : void
Parameters
- $jobID : string
- $options : array<string|int, mixed>
- $pdo : PDO
- $isDryRun : bool
- $resultLog : JobResultLog
Return values
void —getAlias()
{@inheritDoc}
public
getAlias() : string
Return values
string —getConfigOptions()
{@inheritDoc}
public
getConfigOptions(string $jobID) : htmlResponsiveRow
Parameters
- $jobID : string
Return values
htmlResponsiveRow —getDescription()
{@inheritDoc}
public
getDescription() : string
Return values
string —getLastEffectiveExecutionDate()
Returns the last effective execution date.
public
static getLastEffectiveExecutionDate(DateTime $baseDate, int $monthInterval, JobResultLog $resultLog) : DateTime
Parameters
- $baseDate : DateTime
-
base date
- $monthInterval : int
-
number of months in interval
- $resultLog : JobResultLog
-
result log
Return values
DateTime —date
checkSingleUser()
{@inheritDoc}
protected
checkSingleUser(string $jobID, array<string|int, mixed> $options, PDO $pdo, DateTime $now, array<string|int, mixed> $policyOptions, array<string|int, mixed> $user, bool $isDryRun) : void
Parameters
- $jobID : string
- $options : array<string|int, mixed>
- $pdo : PDO
- $now : DateTime
- $policyOptions : array<string|int, mixed>
- $user : array<string|int, mixed>
- $isDryRun : bool
Return values
void —findUsers()
{@inheritDoc}
protected
findUsers(string $jobID, array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $jobID : string
- $options : array<string|int, mixed>
Return values
array<string|int, mixed> —getPolicyOptions()
protected
getPolicyOptions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —formatGroups()
Formats the managed groups.
private
formatGroups(array<string|int, array<string, string[]|string>> $managedGroups, bool $isHTML) : string
Parameters
- $managedGroups : array<string|int, array<string, string[]|string>>
-
managed groups
- $isHTML : bool
-
HTML email
Return values
string —formatted text
getBaseDate()
Returns the base date (first of month) for the current date.
private
getBaseDate(DateTime $currentDate) : DateTime
Parameters
- $currentDate : DateTime
-
current date
Return values
DateTime —base date
getMonthInterval()
Returns the month interval.
private
getMonthInterval(array<string, array<string|int, string>> $options, string $jobId) : int
Parameters
- $options : array<string, array<string|int, string>>
-
config options
- $jobId : string
-
job id
Return values
int —interval
shouldRun()
Returns if the job should run.
private
shouldRun(PDO $pdo, string $jobId, DateTime $baseDate, int $monthInterval) : bool
Parameters
- $pdo : PDO
-
PDO
- $jobId : string
-
job id
- $baseDate : DateTime
-
base date
- $monthInterval : int
-
month interval
Return values
bool —should run