Files
WebDB/website/public/API/loadFriendRequest.php
Lars van Hijfte 60b55b3f04 Added comments
Also hiding the mail/age if said so by the user
2017-02-02 10:29:49 +01:00

17 lines
427 B
PHP

<?php
session_start();
require_once ("../../queries/connect.php");
require_once ("../../queries/friendship.php");
require_once ("../../queries/user.php");
// Check if the user is allowed to load them.
if (isset($_SESSION["userID"]) &&
getRoleByID($_SESSION["userID"]) != 'frozen' &&
getRoleByID($_SESSION["userID"]) != 'banned') {
echo selectAllFriendRequests();
} else {
header('HTTP/1.0 403 Forbidden');
}