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 407 to 411

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 4th October 2022 11:05 Europe/London time based on the source file dated 3rd October 2022 15:15 Europe/London time.