Collections functions
General functions
Render functions
Theme permission functions
Resource functions

message_purge()

Description

Remove all messages from message and user_message tables that have expired (regardless of read).
This will be called from a cron job.

Parameters

This function accepts no parameters.

Return

void

Location

include/message_functions.php lines 189 to 193

Definition

 
function message_purge()
    {
    
ps_query("DELETE FROM user_message WHERE message IN (SELECT ref FROM message where expires < NOW())", array());
    
ps_query("DELETE FROM message where expires < NOW()", array());
    }

This article was last updated 25th May 2022 20:35 Europe/London time based on the source file dated 26th January 2022 11:10 Europe/London time.