diff --git a/website/queries/user.php b/website/queries/user.php index 15b7fb1..ed431f6 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -35,7 +35,18 @@ function getUsername($userID) { function selectUser($me, $other) { $stmt = $GLOBALS["db"]->prepare(" SELECT - `username`, `birthdate`, `location`, `profilepicture`, `bio`, `user`.`creationdate`, `onlinestatus`, `fname`, `lname`, + `username`, + `birthdate`, + `location`, + IFNULL( + `profilepicture`, + '../img/avatar-standard.png' + ) AS profilepicture, + `bio`, + `user`.`creationdate`, + `onlinestatus`, + `fname`, + `lname`, CASE `status` IS NULL WHEN TRUE THEN 0 WHEN FALSE THEN diff --git a/website/views/profile.php b/website/views/profile.php index 83dbca7..2bc0341 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -27,7 +27,7 @@