Zend_Auth and Zend_Session
Moderator: General Moderators
Zend_Auth and Zend_Session
I had a question regarding implementing a login/logout functionality. Is it enough if i just use Zend_Auth or is it necessary to use Zend_Session too? cos i read somewer that Zend_Auth creates sessions internally. so will that create a problem having two diffrent sessions?
Re: Zend_Auth and Zend_Session
Regardless of how you spin it, a user only has one session. Zend_Session uses namespacing (ie, meaningful array indexes in this case) to prevent conflicts in the session and data overwrites. If you do not manually set the session for Zend_Auth (or any other auth adapter), it will use the default - which should be good enough, unless you have several sites who use the same default on the same server, in which case there might be conflicts (the same identity available on several sites).
In usually set the session namespace manually to prevent such conflicts from occurring.
In usually set the session namespace manually to prevent such conflicts from occurring.
Re: Zend_Auth and Zend_Session
No, zend_session just wraps the existing superglobal. You could run into some headaches if you're not careful but you should be able to get the 2 solutions to interoperate.scaraffe wrote: will that create a problem having two diffrent sessions?