From 75e4495c0d09d587bd1bf208b0fa3d4bf9b7932b Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 5 Dec 2017 21:44:17 -0500 Subject: [PATCH] logout --- www/application/controllers/User_Tweets.php | 6 ++++++ www/application/views/templates/nav.php | 4 ++++ www/css/styles.css | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/www/application/controllers/User_Tweets.php b/www/application/controllers/User_Tweets.php index 168f379..dbfdc30 100644 --- a/www/application/controllers/User_Tweets.php +++ b/www/application/controllers/User_Tweets.php @@ -39,4 +39,10 @@ class User_Tweets extends CI_Controller { } + public function logout(){ + $this->load->helper('url'); + $this->session->sess_destroy(); + redirect("/login"); + } + } diff --git a/www/application/views/templates/nav.php b/www/application/views/templates/nav.php index c728335..34f7de3 100644 --- a/www/application/views/templates/nav.php +++ b/www/application/views/templates/nav.php @@ -8,5 +8,9 @@ +
+ +
diff --git a/www/css/styles.css b/www/css/styles.css index 97fbb0d..769d1e0 100644 --- a/www/css/styles.css +++ b/www/css/styles.css @@ -40,6 +40,12 @@ img.icon.reg { margin:0 auto; } +form.logout.form-inline.my-2.my-lg-0 { + float: right; + margin-top: 6.5px; + margin-right: 4em; +} + .user-content{ background-color:#ffffff; border-radius: 4px;