Collections functions
General functions
Render functions
Theme permission functions
Resource functions

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 802 to 810

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 20th May 2022 08:05 Europe/London time based on the source file dated 17th May 2022 15:20 Europe/London time.