Record who jumped from the background to the foreground and what operations they did.
type here
'user' => [
'identityClass' => 'app\models\Merchant',
'enableAutoLogin' => true,
],
Yii::$app->user->login($data, $this->rememberMe ? 3600 * 24 * 30 : 0);
I tried two methods but couldn’t get the value of the stored adminUserId on the next request.
1.Customize a field private adminUserId and provide settergetter method
2.Add adminUserId in AR’s attrbutes
Yii::$app->user->identity
Next request does not have adminUserId
I found that other private fields customized in the merchant will also disappear, such as priavte originTel. This originTel is mainly used to store the original phone number in afterFind(). Tel is a desensitized number.
Only its own _attributes will not change
zzllmejxt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.