diff --git a/docs/index.php b/docs/index.php index 53c0018..1d8db60 100644 --- a/docs/index.php +++ b/docs/index.php @@ -12,7 +12,6 @@ if (!$username) return; if (!array_key_exists('post',$_POST)) return; - $postie = $_POST['post']; if (strlen($postie) < 1 || strlen($postie) > 1024) { diff --git a/docs/user.php b/docs/user.php index 800eb1c..42a6eb7 100644 --- a/docs/user.php +++ b/docs/user.php @@ -1,6 +1,9 @@ prepare("SELECT * FROM follow WHERE target = ?"); + $stmt = $db->prepare("SELECT * FROM main.follow WHERE target = ?"); $stmt->execute([$user]); $following = $stmt->fetchAll(PDO::FETCH_DEFAULT); - $stmt = $db->prepare("SELECT * FROM follow WHERE username = ?"); + $stmt = $db->prepare("SELECT * FROM main.follow WHERE username = ?"); $stmt->execute([$user]); $followers = $stmt->fetchAll(PDO::FETCH_DEFAULT); + $stmt = $db->prepare("SELECT * FROM main.role WHERE username = ?"); + $stmt->execute([$user]); + + $roles = $stmt->fetchAll(PDO::FETCH_DEFAULT); } function follow() { @@ -97,6 +104,9 @@