Welcome Guest, Not a member yet? Register   Sign In
User Authentication - Placement of code?
#12

[eluser]RyanH[/eluser]
That makes sense. I'm attempting to test this but for whatever reason, I can't get a few things to work before I can test this. The first being I can't get the logout link to work. I've read the user guide for URL's and I thought it made sense, but it's apparently not working. I created a logout function in the login controller file that does the following:
Code:
$this->session->sess_destroy();
$this->load->view('home_view');
The session is destroyed and the user is shown the home page once the session is destroyed. The link that I have is this:
Code:
// 'login' is the class (it's also the file name) and logout is the function as per the user guide
anchor('login/logout', 'Logout');
However this is not working. Perhaps I just don't understand how CI handles URL's.

Secondly, it seems as if each page I go to while I'm "logged in", a new session is created. Any particular reason? Anyway to fix this? Thank you for your help!


Messages In This Thread
User Authentication - Placement of code? - by El Forum - 01-21-2008, 12:31 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 12:40 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 12:48 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 12:59 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 01:10 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 02:55 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 03:55 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 04:01 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 04:22 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 06:05 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 06:21 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 06:37 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 07:07 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 07:11 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 07:25 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 07:34 PM
User Authentication - Placement of code? - by El Forum - 01-21-2008, 08:01 PM
User Authentication - Placement of code? - by El Forum - 01-23-2008, 03:43 PM
User Authentication - Placement of code? - by El Forum - 01-23-2008, 05:42 PM
User Authentication - Placement of code? - by El Forum - 01-25-2008, 03:55 AM
User Authentication - Placement of code? - by El Forum - 01-25-2008, 08:58 AM
User Authentication - Placement of code? - by El Forum - 01-25-2008, 09:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB