mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-20 02:16:41 +08:00
Added more YII_ENV constants.
This commit is contained in:
@ -416,7 +416,7 @@ class User extends Component
|
||||
public function switchIdentity($identity, $duration = 0)
|
||||
{
|
||||
$session = Yii::$app->getSession();
|
||||
if (YII_ENV !== 'test') {
|
||||
if (!YII_ENV_TEST) {
|
||||
$session->regenerateID(true);
|
||||
}
|
||||
$this->setIdentity($identity);
|
||||
|
Reference in New Issue
Block a user