From 3df23f291f35913c5cdcdda83e3f0663a836359d Mon Sep 17 00:00:00 2001 From: David <davidkwan95@gmail.com> Date: Wed, 6 Apr 2016 21:11:58 +0700 Subject: [PATCH] fix PublicUserController and ProfileController --- IES-Bandung/app/Http/Controllers/ProfileController.php | 2 +- IES-Bandung/app/Model/PublicUser.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/IES-Bandung/app/Http/Controllers/ProfileController.php b/IES-Bandung/app/Http/Controllers/ProfileController.php index fb834fa..c844248 100644 --- a/IES-Bandung/app/Http/Controllers/ProfileController.php +++ b/IES-Bandung/app/Http/Controllers/ProfileController.php @@ -40,6 +40,6 @@ class ProfileController extends Controller exit(); } - return $this->controller->showProfile($user['id']); + return $this->controller->showProfile($username); } } diff --git a/IES-Bandung/app/Model/PublicUser.php b/IES-Bandung/app/Model/PublicUser.php index a8c0b83..174ac73 100644 --- a/IES-Bandung/app/Model/PublicUser.php +++ b/IES-Bandung/app/Model/PublicUser.php @@ -16,6 +16,6 @@ class PublicUser extends Model } public function getFullProfile($username) { - return $this->join('users', 'users.id', '=', 'PublicUser.userID')->where('PublicUser.username', '=', $username)->get(); + return $this->join('users', 'users.id', '=', 'PublicUser.userID')->where('users.username', '=', $username)->get(); } } -- GitLab