From 3c30c51ed9942040ee11ba9e833e0de80cb68ca3 Mon Sep 17 00:00:00 2001 From: Shemona Singh Date: Mon, 4 Dec 2017 12:32:24 -0500 Subject: [PATCH 1/2] user page --- www/application/controllers/User_Tweets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/application/controllers/User_Tweets.php b/www/application/controllers/User_Tweets.php index ea30205..3f202b6 100644 --- a/www/application/controllers/User_Tweets.php +++ b/www/application/controllers/User_Tweets.php @@ -9,7 +9,7 @@ function __Construct(){ } public function index(){ - $this->data['posts'] = $this->Users_Tweets_Model2->getPosts(); + $this->data['posts'] = $this->User_Tweets_Model->getPosts(); $this->load->view('user', $this->data); } } From 837ee50b663b9a1711c9302a9a4b47217dab976f Mon Sep 17 00:00:00 2001 From: Shemona Singh Date: Mon, 4 Dec 2017 21:50:13 -0500 Subject: [PATCH 2/2] sessions --- www/application/models/User_Tweets_Model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/www/application/models/User_Tweets_Model.php b/www/application/models/User_Tweets_Model.php index 6292bf0..50904b7 100644 --- a/www/application/models/User_Tweets_Model.php +++ b/www/application/models/User_Tweets_Model.php @@ -1,10 +1,11 @@ db->select("first_name, last_name, username, tweet, date_time"); $this->db->from('Users, Tweets'); - $this->db->where('Users.id = Tweets.user_id'); + $this->db->where("Users.id = Tweets.user_id and Users.id = $user_id"); $this->db->order_by('date_time', 'DESC'); $query = $this->db->get(); return $query->result_array();