In the constructor you’re redirecting to the login page if not logged in. Are you sure the user is logged in?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
February 10, 2010 7:00pm
Subscribe [287]#1291 / Dec 13, 2012 1:58pm
In the constructor you’re redirecting to the login page if not logged in. Are you sure the user is logged in?
#1292 / Dec 13, 2012 2:01pm
In the constructor you’re redirecting to the login page if not logged in. Are you sure the user is logged in?
Yes it’s logged in because I use the same in another controllers and works fine :-(
#1293 / Dec 13, 2012 2:18pm
Are you overwriting the session values anywhere?
I would inspect the session and make sure it looks right.
Also, make sure your session cookie name doesnt have an underscore as that can cause issues with CI’s session lib.
#1294 / Dec 13, 2012 2:23pm
Hi Edmuns, see here:
session_id e7c7b4364b5fcd5f9cdf3e12ae047d5a
ip_address 192.168.2.106
user_agent Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11
last_activity 1355426695
user_data
identity .(JavaScript must be enabled to view this email address)
username administrator
email .(JavaScript must be enabled to view this email address)
user_id 1
old_last_login 1355411427
userCount 1
userSort id_autor
userDirection desc
author_id 44339Ths is my session data
#1295 / Dec 13, 2012 2:38pm
Looks good, as a test comment out that redirect code in the constructor and see what happens.
#1296 / Dec 13, 2012 2:41pm
Looks good, as a test comment out that redirect code in the constructor and see what happens.
You mean this:
if (!$this->ion_auth->logged_in()) {
//redirect('auth/login');
}The view ‘author/updateauthor’ is showed as should be without problems (I´m executing update() method which is the one causing the problem)
#1297 / Dec 13, 2012 2:46pm
Post your Mauthor model.
#1298 / Dec 13, 2012 2:48pm
#1299 / Dec 13, 2012 2:55pm
Your model looks good. Is there anywhere else that you are redirecting? If not I would try commenting out that code in the constructor to see if thats the issue.
#1300 / Dec 13, 2012 2:57pm
No I’ just redirecting in the constructor and if I comment the code in the constructor then any can enter to the controller and I don’t want that. You said “try commenting out that code in the constructor” which code? which constructor?
#1301 / Dec 13, 2012 3:05pm
Comment out
if (!$this->ion_auth->logged_in()) {
//redirect('auth/login');
}I know it’ll leave it open, this is just a test to make sure this is the issue.
#1302 / Dec 13, 2012 3:07pm
I test earlier and say you works fine, see this post http://ellislab.com/forums/viewreply/1044075/
#1303 / Dec 13, 2012 3:38pm
There’s no way the update model you’re calling is doing that as far as I can see. You might have to step through and put some debugging code in the logged_in() method to see what’s up…
Sorry but I really cant tell what’s up so you’ll need to just troubleshoot it.
#1304 / Dec 14, 2012 10:30am
Lol, nvm, works of some reason now ^^
#1305 / Jan 07, 2013 5:05pm
Hi Ben,
Loving ion auth!
Went through the docs but couldn’t find any information on my problem..
To add a user I’m not using the ion auth forms. My co-worker made the front end part and I’m having problems creating the sha1 passwords. I turned off the salt but it still doesn’t seem to work.
Any help would be greatly appreciated 😊