Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - logout problem
#1

[eluser]kacyvu[/eluser]
Hi all,

I do not know if I am missing something, but when I create new user and log in with new users credentials and try to retrieve users details I get administrators info which I used before to log in. As well when I log myself out I still can see users info. For logging out I use:
Code:
$this->ion_auth->logout();
.
Do I need somehow add some extra code to kill session or what ? Thanks a lot.
#2

[eluser]solid9[/eluser]
I think the logout() has destroy session.
#3

[eluser]Jason Hamilton-Mascioli[/eluser]
Make sure to add this to the top of your protected/secure controller page...

if (!$this->ion_auth->logged_in())
{
redirect('auth/login');
}
#4

[eluser]kacyvu[/eluser]
Guys,

Should this one get current logged in user email ? Or first row user email in DB ?
Code:
$user = $this->ion_auth->user()->row();
  echo $user->email;
#5

[eluser]Matalina[/eluser]
with out an id it will get the current logged in user.
#6

[eluser]kacyvu[/eluser]
ok I found my mistake thanks for everyone




Theme © iAndrew 2016 - Forum software by © MyBB