yii2-usuario
yii2-usuario copied to clipboard
SessionHistory don't work
What steps will reproduce the problem?
I have override classes 'classMap' => [ 'User' => \common\models\User::class, 'Profile' => \common\models\Profile::class, 'RegistrationForm' => \common\forms\RegistrationForm::class, 'LoginForm' => \common\forms\LoginForm::class, 'Token' => \common\models\Token::class, 'MailService' => \common\components\user\Service\MailService::class, ], 'controllerMap' => [ 'registration' => 'frontend\controllers\user\RegistrationController', 'security' => 'frontend\controllers\user\SecurityController', 'profile' => 'frontend\controllers\user\ProfileController', 'settings' => 'frontend\controllers\user\SettingsController', 'admin' => 'frontend\controllers\user\AdminController', ],
SessionHistory settings configure like in docs But on the page SessionHistory empty
May be need some changes in the override actions or functions. where module save data about session in to the database?
Have you checked app.log
or webserver's error log?
No errors. If there were errors, I would correct everything. Perhaps some new line of code is missing in my redefined actions At what point is the session database written to?
The session class is loaded into the bootstrapping phase.
Try with XDebug to understand why it's not writing data to db.
I have the same error, I configured it exactly as instructed but the database has no records written
same issue, in log only deleting old session and didnt create new session history entity, any suggestion?
i found fix, in Da\User\Service\SessionHistory\SessionHistoryDecorator::class
fix function
public function getUseCustomStorage() { return $this->session->getUseCustomStorage(); }
To
public function getUseCustomStorage() { return true; }
Hope to receive everyone's comments. I think this function still has some error.