Re: Stop Users From Going Back After Logout

2007-12-17 Thread John David Anderson (_psychic_)


On Dec 17, 2007, at 4:29 PM, Chris Hartjes wrote:

>
> On Dec 17, 2007 5:33 PM, MrG <[EMAIL PROTECTED]> wrote:
>>
>> Hi Chris, I was looking for those two tutorials in your blog but  
>> can't
>> find none.
>>
>
> http://www.littlehart.net/atthekeyboard/2007/09/11/a-hopefully-useful-tutorial-for-using-cakephps-auth-component/
>
> http://www.littlehart.net/atthekeyboard/2007/11/20/follow-up-to-a-hopefully-usefull-tutorial-for-using-cakephps-auth-component/

Hey those look like some good candidates for the manual...

;o)

-- John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-17 Thread Chris Hartjes

On Dec 17, 2007 5:33 PM, MrG <[EMAIL PROTECTED]> wrote:
>
> Hi Chris, I was looking for those two tutorials in your blog but can't
> find none.
>

http://www.littlehart.net/atthekeyboard/2007/09/11/a-hopefully-useful-tutorial-for-using-cakephps-auth-component/

http://www.littlehart.net/atthekeyboard/2007/11/20/follow-up-to-a-hopefully-usefull-tutorial-for-using-cakephps-auth-component/

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-17 Thread MrG

Hi Chris, I was looking for those two tutorials in your blog but can't
find none.

Regards

On Dec 4, 6:11 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Dec 4, 2007 12:49 PM, Joyce <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I have question regarding how to prevent users from going back to the
> > application after they have logout.
>
> I suggest you use the Auth component if you are using CakePHP 1.2.
> Since I'm a shameless self-promotor, there are two tutorials on using
> the Auth component on my blog.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheKeyboard -http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-05 Thread AD7six

Use the (sweet) sauce luke

https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/controller/controller.php?rev=6000#L720
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-05 Thread Adam Royle

Probably sending out no-cache headers would do the trick. Example
taken from php manual... Could put this in your bootstrap.php or in
appcontroller

header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past

Cheers,
Adam

On Dec 5, 6:44 pm, Joyce <[EMAIL PROTECTED]> wrote:
> Oh yeah, you reminded me. It could be just that.
>
> Would that be possible to do a no cache upon redirect or somehow
> before it, probably just for that page or so?
>
> I was able to do something like that for hardcoding no javascript
> involved, where once users logout, even if they used browser back,
> they will still be prompted to the login.
>
> But with cakephp, as a newbie still on the way exploring cake, i have
> no idea, could that be done?
>
> On Dec 5, 6:06 am, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> > What kiger was getting at is that the user can only see what is in
> > their browser's cache - which is what they were allowed to see a
> > second ago anyway...  They won't be able to click any links, or
> > perform any actions.
>
> > But regardless, what you really want is browser history management.
> > Search google for javascript to destroy the browser history, or have
> > some javascript that on page load performs an ajax request to check
> > login status - this javascript will run again even on hitting the back
> > button.
>
> > But without Javascript I don't think it is possible - unless anyone
> > knows of page headers that can instruct a browser not to cache at
> > all?  I haven't heard of such a thing.
>
> > On Dec 5, 4:39 am, Joyce <[EMAIL PROTECTED]> wrote:
>
> > > I see. Hopefully I can get what you mean by that.
>
> > > I will give it a shot. Thanks.
>
> > > On Dec 5, 2:31 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>
> > > > On Dec 4, 2007 1:26 PM, Joyce <[EMAIL PROTECTED]> wrote:
>
> > > > > Thanks Chris,
>
> > > > > I will look through your tutorials. I am using CakePHP 1.1, can that
> > > > > work?
>
> > > > The Auth component is not available in 1.2, but I believe you can use
> > > > the Security component to do similar things.
>
> > > > --
> > > > Chris Hartjes
>
> > > > My motto for 2007:  "Just build it, damnit!"
>
> > > > @TheKeyboard -http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-05 Thread Joyce

Oh yeah, you reminded me. It could be just that.

Would that be possible to do a no cache upon redirect or somehow
before it, probably just for that page or so?

I was able to do something like that for hardcoding no javascript
involved, where once users logout, even if they used browser back,
they will still be prompted to the login.

But with cakephp, as a newbie still on the way exploring cake, i have
no idea, could that be done?

On Dec 5, 6:06 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> What kiger was getting at is that the user can only see what is in
> their browser's cache - which is what they were allowed to see a
> second ago anyway...  They won't be able to click any links, or
> perform any actions.
>
> But regardless, what you really want is browser history management.
> Search google for javascript to destroy the browser history, or have
> some javascript that on page load performs an ajax request to check
> login status - this javascript will run again even on hitting the back
> button.
>
> But without Javascript I don't think it is possible - unless anyone
> knows of page headers that can instruct a browser not to cache at
> all?  I haven't heard of such a thing.
>
> On Dec 5, 4:39 am, Joyce <[EMAIL PROTECTED]> wrote:
>
> > I see. Hopefully I can get what you mean by that.
>
> > I will give it a shot. Thanks.
>
> > On Dec 5, 2:31 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>
> > > On Dec 4, 2007 1:26 PM, Joyce <[EMAIL PROTECTED]> wrote:
>
> > > > Thanks Chris,
>
> > > > I will look through your tutorials. I am using CakePHP 1.1, can that
> > > > work?
>
> > > The Auth component is not available in 1.2, but I believe you can use
> > > the Security component to do similar things.
>
> > > --
> > > Chris Hartjes
>
> > > My motto for 2007:  "Just build it, damnit!"
>
> > > @TheKeyboard -http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-04 Thread Grant Cox

What kiger was getting at is that the user can only see what is in
their browser's cache - which is what they were allowed to see a
second ago anyway...  They won't be able to click any links, or
perform any actions.

But regardless, what you really want is browser history management.
Search google for javascript to destroy the browser history, or have
some javascript that on page load performs an ajax request to check
login status - this javascript will run again even on hitting the back
button.

But without Javascript I don't think it is possible - unless anyone
knows of page headers that can instruct a browser not to cache at
all?  I haven't heard of such a thing.


On Dec 5, 4:39 am, Joyce <[EMAIL PROTECTED]> wrote:
> I see. Hopefully I can get what you mean by that.
>
> I will give it a shot. Thanks.
>
> On Dec 5, 2:31 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>
> > On Dec 4, 2007 1:26 PM, Joyce <[EMAIL PROTECTED]> wrote:
>
> > > Thanks Chris,
>
> > > I will look through your tutorials. I am using CakePHP 1.1, can that
> > > work?
>
> > The Auth component is not available in 1.2, but I believe you can use
> > the Security component to do similar things.
>
> > --
> > Chris Hartjes
>
> > My motto for 2007:  "Just build it, damnit!"
>
> > @TheKeyboard -http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-04 Thread Joyce

I see. Hopefully I can get what you mean by that.

I will give it a shot. Thanks.

On Dec 5, 2:31 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Dec 4, 2007 1:26 PM, Joyce <[EMAIL PROTECTED]> wrote:
>
>
>
> > Thanks Chris,
>
> > I will look through your tutorials. I am using CakePHP 1.1, can that
> > work?
>
> The Auth component is not available in 1.2, but I believe you can use
> the Security component to do similar things.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheKeyboard -http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-04 Thread Chris Hartjes

On Dec 4, 2007 1:26 PM, Joyce <[EMAIL PROTECTED]> wrote:
>
> Thanks Chris,
>
> I will look through your tutorials. I am using CakePHP 1.1, can that
> work?

The Auth component is not available in 1.2, but I believe you can use
the Security component to do similar things.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-04 Thread Joyce

Thanks Chris,

I will look through your tutorials. I am using CakePHP 1.1, can that
work?


On Dec 5, 2:11 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Dec 4, 2007 12:49 PM, Joyce <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I have question regarding how to prevent users from going back to the
> > application after they have logout.
>
> I suggest you use the Auth component if you are using CakePHP 1.2.
> Since I'm a shameless self-promotor, there are two tutorials on using
> the Auth component on my blog.
>
> --
> Chris Hartjes
>
> My motto for 2007:  "Just build it, damnit!"
>
> @TheKeyboard -http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-04 Thread Joyce

The thing is that it is not a blank page. It contains the value of
whatever details that is seen as per when he logged in.

On Dec 5, 2:15 am, kiger <[EMAIL PROTECTED]> wrote:
> Why does it matter? If you delete the session storing the user data,
> then pressing back might bring him to a blank page, but who cares?
>
> On Dec 4, 12:49 pm, Joyce <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I have question regarding how to prevent users from going back to the
> > application after they have logout.
>
> > Below is my index and logout for userscontroller:
> > function index() {
> > $this->checkSession();
> > if ($this->Session->check('user')) {
> > $this->User->recursive = 0;
> > $this->set('users', $this->User->findAll());
> > } else {
> > $this->redirect('/');
> > }
>
> > }
>
> > function logout() {
> > $this->Session->delete('user');
> > $this->Session-> destroy();
> > $this->redirect('/');
>
> > }
>
> > But I still am not able to stop users from clicking on the browser's
> > back button, and yet still able to see the index page even after they
> > have logout. Would anyone be able to point out what am I missing?
>
> > Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-04 Thread kiger

Why does it matter? If you delete the session storing the user data,
then pressing back might bring him to a blank page, but who cares?

On Dec 4, 12:49 pm, Joyce <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have question regarding how to prevent users from going back to the
> application after they have logout.
>
> Below is my index and logout for userscontroller:
> function index() {
> $this->checkSession();
> if ($this->Session->check('user')) {
> $this->User->recursive = 0;
> $this->set('users', $this->User->findAll());
> } else {
> $this->redirect('/');
> }
>
> }
>
> function logout() {
> $this->Session->delete('user');
> $this->Session-> destroy();
> $this->redirect('/');
>
> }
>
> But I still am not able to stop users from clicking on the browser's
> back button, and yet still able to see the index page even after they
> have logout. Would anyone be able to point out what am I missing?
>
> Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Stop Users From Going Back After Logout

2007-12-04 Thread Chris Hartjes

On Dec 4, 2007 12:49 PM, Joyce <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have question regarding how to prevent users from going back to the
> application after they have logout.
>

I suggest you use the Auth component if you are using CakePHP 1.2.
Since I'm a shameless self-promotor, there are two tutorials on using
the Auth component on my blog.


-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Stop Users From Going Back After Logout

2007-12-04 Thread Joyce

Hi,

I have question regarding how to prevent users from going back to the
application after they have logout.

Below is my index and logout for userscontroller:
function index() {
$this->checkSession();
if ($this->Session->check('user')) {
$this->User->recursive = 0;
$this->set('users', $this->User->findAll());
} else {
$this->redirect('/');
}
}

function logout() {
$this->Session->delete('user');
$this->Session-> destroy();
$this->redirect('/');
}

But I still am not able to stop users from clicking on the browser's
back button, and yet still able to see the index page even after they
have logout. Would anyone be able to point out what am I missing?

Thanks in advance.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---