public function getUserPhoto($accountId)
{
$stmt = $this->db->prepare("SELECT lowPhotoUrl FROM users WHERE id = (:id) LIMIT 1");
$stmt->bindParam(":id", $accountId, PDO::PARAM_INT);
$stmt->execute();
if ($stmt->rowCount() > 0) {
$row = $stmt->fetch();
if (strlen($row['lowPhotoUrl']) == 0) {
return "/img/profile_default_photo.png";
} else {
return $row['lowPhotoUrl'];
}
}
return "/img/profile_default_photo.png";
}