mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-01-06 06:46:00 +00:00
20 lines
362 B
PHP
20 lines
362 B
PHP
|
<?php
|
||
|
/*
|
||
|
Check if user is image owner
|
||
|
|
||
|
Returns True if user is privilaged
|
||
|
Returns False if user is NOT privilaged
|
||
|
*/
|
||
|
function image_privilage($id) {
|
||
|
$session_id = $_SESSION['id'];
|
||
|
if (isset($session_id) || !empty($session_id)) {
|
||
|
if ($session_id == $id) {
|
||
|
return True;
|
||
|
} else {
|
||
|
return False;
|
||
|
}
|
||
|
} else {
|
||
|
return False;
|
||
|
}
|
||
|
}
|