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

get_resource_lock_message()

Parameters

ColumnTypeDefaultDescription
$lockuser

Location

include/resource_functions.php lines 8484 to 8507

Definition

 
function get_resource_lock_message($lockuser)
    {
    global 
$lang$userref;
    
// Check if user can see details of locking user
    
$visible_users get_users(0,"","u.username",true);
    if(
$lockuser == 0)
        {
        return 
"";
        }
    elseif(
$lockuser == $userref)
        {
        return 
$lang["status_locked_self"];
        }
    elseif(
in_array($lockuser,array_column($visible_users,"ref")))
        {
        
$lock_user_data get_user($lockuser);
        
$lock_username $lock_user_data["fullname"] != "" $lock_user_data["fullname"] : $lock_user_data["username"];
        return 
str_replace("%%USER%%"$lock_username$lang["status_locked_by"]);
        }
    else
        {
        return 
$lang["error_locked_other_user"];
        }
    }

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