Fixed bug (not showing profile when on own profile)
This commit is contained in:
@@ -21,19 +21,14 @@ include_once("../queries/calcAge.php");
|
|||||||
|
|
||||||
if(empty($_GET["username"])) {
|
if(empty($_GET["username"])) {
|
||||||
$userID = $_SESSION["userID"];
|
$userID = $_SESSION["userID"];
|
||||||
$showProfile = True;
|
|
||||||
} else {
|
} else {
|
||||||
$userID = getUserID($_GET["username"]);
|
$userID = getUserID($_GET["username"]);
|
||||||
$showProfile = False;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = selectUser($_SESSION["userID"], $userID);
|
$user = selectUser($_SESSION["userID"], $userID);
|
||||||
$profile_friends = selectAllFriends($userID);
|
$profile_friends = selectAllFriends($userID);
|
||||||
$profile_groups = selectAllUserGroups($userID);
|
$profile_groups = selectAllUserGroups($userID);
|
||||||
$showProfile = $showProfile || $user["showProfile"] || ($user["status"] == 'confirmed');
|
$showProfile = $user["showProfile"] || ($user["status"] == 'confirmed') || $_SESSION["userID"] == $userID;
|
||||||
echo " friendship status: " . $user["status"];
|
|
||||||
echo " showprofile: $showProfile";
|
|
||||||
echo " userID: " . $user["userID"];
|
|
||||||
|
|
||||||
|
|
||||||
if ($userID == $_SESSION["userID"]) {
|
if ($userID == $_SESSION["userID"]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user