• Welcome to Simple Machines Community Forum. Please login or sign up.

deleteMessages

Description

Handles deleting of personal messages

Syntax

void deleteMessages ([array $personalMessages[, string $folder[, mixed $owner]]])



Parameter $personalMessages

Expected type: Array of Integers
Description: An array of integers corresponding to the IDs of the PMs that should be deleted. If not specified, all PMs are deleted.



Parameter $folder

Expected type: Enumerated String
Description: The folder to delete PMs from, or null to delete them from both folders

Possible string values
Allowed values Description
'inbox' Indicates that the PMs should only be deleted from the inbox
'null' Default value. Indicates that the PMs should be deleted from both folders.
'outbox' Indicates that the PMs should only be deleted from the outbox



Parameter $owner

Expected type: Mixed
Description: The ID of the member whose PMs are being deleted. If not specified, the ID of the current member ($ID_MEMBER) is used instead

Allowed types for $owner
Allowed values Description
Null Default value. Indicates that the owner is the current member
Integer The member ID of the owner of the PMs to delete (only specified if the owner is someone other than the current member, such as when an admin deletes this person's account)


Notes

  • Used by MessageKillAll and MessagePrune
  • Cannot be called directly
  • If no owner is specified, assumes the current member is the owner
  • Deletes either the specified PMs or all of them if not specified
  • Doesn't actually delete the PM from the database unless all recipients have also deleted that PM
  • Recalculates appropriate statistics
Advertisement: