We are developing a site using ZendFrame work.
We need to set a auth variable(role) to manage user-type.
For that we use a variable this->view->auth->getIdentity()->role to manage user-type.
In one chase we are trying to assign the user-type statically.
What is the code to assign the auth variable ‘role’.
We tried with this->view->auth->getIdentity()->role = 'test', but it through warning.
The following should allow you to create a new
Zend_Authidentity upon successful login :As for the user data, I usually store the database row corresponding to the user with the required fields like Name, surname, email, role, to name a few. If you store a
Zend_Db_TableRowin theZend_Authyou will be able to access it like this :Quick reminder on
Zend_Auth:For more you can read the official documentation : Zend_Auth