add different session for backend and frontend

This commit is contained in:
Roland Schneider 2015-11-04 18:56:44 +01:00
parent ed9c1e77cd
commit 5cb37861c5
2 changed files with 16 additions and 0 deletions

View File

@ -16,7 +16,15 @@ return [
'user' => [ 'user' => [
'identityClass' => 'common\models\User', 'identityClass' => 'common\models\User',
'enableAutoLogin' => true, 'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_backendUser', // unique for backend
'path'=>'/backend/web' // correct path for the backend app.
]
], ],
'session' => [
'name' => '_backendSessionId', // unique for backend
'savePath' => __DIR__ . '/../runtime', // a temporary folder on backend
],
'log' => [ 'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0, 'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [ 'targets' => [

View File

@ -15,7 +15,15 @@ return [
'user' => [ 'user' => [
'identityClass' => 'common\models\User', 'identityClass' => 'common\models\User',
'enableAutoLogin' => true, 'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_frontendUser', // unique for frontend
'path'=>'/frontend/web' // correct path for the frontend app.
]
], ],
'session' => [
'name' => '_frontendSessionId', // unique for frontend
'savePath' => __DIR__ . '/../runtime', // a temporary folder on frontend
],
'log' => [ 'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0, 'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [ 'targets' => [