Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Shemona Singh authored and Shemona Singh committed Dec 6, 2017
2 parents 418b1ec + 75e4495 commit e8c8469
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions www/application/controllers/User_Tweets.php
Expand Up @@ -39,4 +39,10 @@ class User_Tweets extends CI_Controller {

}

public function logout(){
$this->load->helper('url');
$this->session->sess_destroy();
redirect("/login");
}

}
4 changes: 4 additions & 0 deletions www/application/views/templates/nav.php
Expand Up @@ -8,5 +8,9 @@
<ul class="nav navbar-nav">
<li><a href="/index.php/all_tweets">Feed</a></li>
<li><a href="/index.php/user_tweets">Profile</a></li>
</ul>
<form class="logout form-inline my-2 my-lg-0" action="/index.php/user_tweets/logout" method="post">
<button class="btn btn-primary my-2 my-sm-0" type="submit">Logout</button>
</form>
</div>
</nav>
6 changes: 6 additions & 0 deletions www/css/styles.css
Expand Up @@ -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;
Expand Down

0 comments on commit e8c8469

Please sign in to comment.