I have created on project using boilerplate architecture, in this, I have installed an admin module to manage the activities of the site in backend,this admin module is accessible to site admin and registered user to manage their blogs,posts and comments and have installed site module also under frontend to view blogs and posts, I want if user login using frontend then it should be logged in backend also.
When I access
Yii::app()->user->role
in the frontend/site/index/index (1. index is controller and 2.index is action under IndexController) it returns ‘admin’ as output but when I access
Yii::app()->user->role
under backend/admin/index/index
it returns NULL.
How can I share user session in frontend and backend both?