logo       

Re: Check user: msg#00035

php.zend.framework.auth

Subject: Re: Check user



On 18/10/2007, Csányi András <sayusi.ando@xxxxxxxxx> wrote:
Hi everybody!

I have a question:
My idea is: every page load i check the user is
logined or not with a isLogin(); method.
When the user is logined the program is running. When
the user is not logined redirect to login form.

I read the documentation but i found nothing about this.

Has anybody some idea about the implementation with Zend_auth
or some documentation (url), or something...?

I'm not an expert, but shouldn't you use $auth->hasIdentity() for this?

Also, in your Controller::init() function you could initialize the Redirector action helper with


        $this->_redirector = $this->_helper->getHelper('Redirector');

And then when you want to redirect


        $this->_redirector->goto('action', 'controller');

I searched in the Google without results.

Thanks for help and sorry my english!

Andras

--
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- "Bízzál Istenben és tartsd szárazon a puskaport!" - Cromwell --



--
Vincent
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise