public function setIdentity($identity)
{
// Allows use in console
if (!\Yii::$app->hasProperty('request')) {
$this->_overrideIdentity = $identity;
} else {
parent::setIdentity($identity);
}
// @todo Wrong place for update app config, it's code running only on call user component.
// Configure localization
/*if (!\Yii::$app->user->isGuest) {
\Yii::$app->formatter->locale = \Yii::$app->user->model->locale;
\Yii::$app->formatter->timeZone = \Yii::$app->user->model->timeZone;
}*/
// Expose detail exceptions to support accounts always
/*if ($identity && $identity->getId() === USER_EXTPOINT_SUPPORT) {
Yii::$app->errorHandler->errorView = Yii::$app->errorHandler->exceptionView;
}*/
}