Documentation

Birthday_Notify extends ScheduledTask
in package

This class contains code used to send out "Happy Birthday" emails.

Table of Contents

Constants

RECEIVE_NOTIFY_ALERT  = 0x1
RECEIVE_NOTIFY_EMAIL  = 0x2
Constants for notification types.

Properties

$should_log  : bool
$_details  : array<string|int, mixed>

Methods

__construct()  : mixed
The constructor.
execute()  : bool
This executes the task: loads up the info, puts the email in the queue and inserts any alerts as needed.
getMinUserInfo()  : array<string|int, mixed>
Loads minimal info for the previously loaded user ids
log()  : void
Records the start time and duration of this task.
updateNextTaskTime()  : void
Updates Config::$modSettings['next_task_time'].

Constants

RECEIVE_NOTIFY_EMAIL

Constants for notification types.

public mixed RECEIVE_NOTIFY_EMAIL = 0x2

Properties

$should_log

public bool $should_log = true

Whether to log that the task completed.

$_details

protected array<string|int, mixed> $_details

Holds the details for the task

Methods

__construct()

The constructor.

public __construct(array<string|int, mixed> $details) : mixed
Parameters
$details : array<string|int, mixed>

The details for the task

execute()

This executes the task: loads up the info, puts the email in the queue and inserts any alerts as needed.

public execute() : bool
Tags
todo

PHP 8.2: This can be changed to return type: true.

Return values
bool

Always returns true.

getMinUserInfo()

Loads minimal info for the previously loaded user ids

public getMinUserInfo([array<string|int, mixed> $user_ids = [] ]) : array<string|int, mixed>
Parameters
$user_ids : array<string|int, mixed> = []
Tags
throws
Exception
Return values
array<string|int, mixed>

log()

Records the start time and duration of this task.

public log() : void

updateNextTaskTime()

Updates Config::$modSettings['next_task_time'].

public static updateNextTaskTime() : void

        
On this page

Search results