set_user_collection()

Description

Sets the current collection of $user to be $collection

Parameters

ColumnTypeDefaultDescription
$user integer
$collection integer

Return

void

Location

include/collections_functions.php lines 759 to 766

Definition

 
function set_user_collection($user$collection)
{
    global 
$usercollection,$username,$anonymous_login,$anonymous_user_session_collection;
    if (!(isset(
$anonymous_login) && $username == $anonymous_login) || !$anonymous_user_session_collection) {
        
ps_query("UPDATE user SET current_collection = ? WHERE ref = ?", ["i",$collection,"i",$user]);
    }
    
$usercollection $collection;
}

This article was last updated 6th July 2025 14:35 Europe/London time based on the source file dated 4th July 2025 10:35 Europe/London time.