Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 535 to 543

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)
        {        
        
sql_query("update user set current_collection='" escape_check($collection) . "' where ref='" escape_check($user) . "'");
        }
    
$usercollection=$collection;
    }

This article was last updated 30th November 2020 16:35 Europe/London time based on the source file dated 25th November 2020 10:35 Europe/London time.