Profile will now show the current users page when a username is not given in a get request.

This commit is contained in:
K. Nobel
2017-01-20 12:14:05 +01:00
parent 2f1bbd0a8e
commit 142bae139b

View File

@@ -42,11 +42,10 @@ function nicetime($date) {
} }
if(empty($_GET["username"])) { if(empty($_GET["username"])) {
echo "User does not exist!"; $userID = $_SESSION["userID"];
return; } else {
}
$userID = getUserID($_GET["username"]); $userID = getUserID($_GET["username"]);
}
$user = selectUser($userID); $user = selectUser($userID);
$profile_friends = selectAllFriends($userID); $profile_friends = selectAllFriends($userID);