Welcome Guest, Not a member yet? Register   Sign In
Smarty caching problems in IE
#1

[eluser]Varzock[/eluser]
Hi everybody,

I've been using Smarty with CI for awhile now and I like it. I have coded a simple CMS tool which allows you to login, add/modify/remove users, add pages, modify and remove them, add calendar marks etc etc.

Everything works just fine, the only problem is that on IE, when I log off the system and then login again say /myCMS/user-management, IE doesn't redirect the user to login screen but shows that user-management page even it shouldn't. When I try to click on the links on that page it _then_ redirects me to login page. On Firefox there is no such a problem.

That's why I was thinking wheter it is some kind of a cache problem. I have tried to disable all caching but still that problem doesn't disappear on IE.

Any ideas? Thanks.
#2

[eluser]phpwebdev[/eluser]
Hi Varzock
can u share u code. i really like Smarty ,but too hard to integrate with CI......

I'm read all threads with integration manual but some smarty function don't work (I means Blocks (capture){/capture} .... etc etc )


Regards
phpwebdev
#3

[eluser]Varzock[/eluser]
Hi phpwebdev,

Well there's too much code to share to make it understandable Smile But the main idea is to check wheter user has logged in or not and if he/she has the right to use a specific controller. So I call this check-function on every controller I want to protect. In case user hasn't been logged in yet, they're redirected to login page and if the user doesn't have right to access some controller, they'll be redirect to a page that tells them they don't have access to that page. Then I just use Smarty to display these pages and all variables on them.

One thing though, I am using a helper of my own to assign and display smarty content. I have a function smarty_assign and smarty_display that both contain a smarty object like so:

$this->ci_smarty->assign(...
$this->ci_smarty->display(...
#4

[eluser]Varzock[/eluser]
Nobody? No idea?
#5

[eluser]Sean Murphy[/eluser]
Well, I'd start with how do you handle sessions/cookies. What do you use to determine if a user is logged in or not? At what point is the check made?
#6

[eluser]Varzock[/eluser]
I use OBSession to handle sessions. The check is made in each controller's constructor.




Theme © iAndrew 2016 - Forum software by © MyBB