Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

message_seen_all()

Description

Flags all non-read messages as read for given user and seen type

Parameters

ColumnTypeDefaultDescription
$user int User ID
$seen_type int MESSAGE_ENUM_NOTIFICATION_TYPE_SCREEN - see definitons.php

Return

void

Location

include/message_functions.php lines 151 to 161

Definition

 
function message_seen_all($user,$seen_type=MESSAGE_ENUM_NOTIFICATION_TYPE_SCREEN)
    {
    
$messages = array();
    if (
message_get($messages,$user,true))
        {
        foreach(
$messages as $message)
            {             
            
message_seen($message['ref']);
            }
        }
    }

This article was last updated 29th November 2020 04:35 Europe/London time based on the source file dated 4th August 2020 08:55 Europe/London time.