I have always been confused about the use of zendSession. This is the Chinese version of the official tutorial of ZendSession, http://zend-framework- 2.yangfan.co/blog/556.
The most important thing is the use of ZendSessionContainer class, which is the most important. Container is a container for storing information.
Instantiation of Container,
use ZendSessionContainer;
$container = new Container('namespace');
$container->item = 'foo';
Take out the instance of Container and instantiate the Container with the same name.
$container = new Container("namespace");
echo $container->item;
Then the value is taken out.
Zend doesn’t seem to need to be turned on. I just started watching it and there are a lot of things I don’t understand. $user = new Zend_Session_Namespace('user');
$user->name = $modelUser->username;
$user->setExpirationSeconds(3600);
This is stored directly in the session, for reference only,
User registration or login should have a corresponding userinfo information table, which can be read from the database
As for the question you asked, I think it should be how to retain the information after login
This can be done by using session to save the login. Create a session in the future and read login information at any time