Error Array to string conversion for Yii::$app->user->id

解决方法如下:

  1. ALTER TABLE user ADD PRIMARY KEY(id);
  2. i remove manually from the browser the cookie and it work.

参考:

https://stackoverflow.com/questions/44499961/error-array-to-string-conversion-for-yiiapp-user-id

https://github.com/yiisoft/yii2/issues/1029

https://stackoverflow.com/questions/27681505/login-on-production-server-doesnt-work

发表评论

电子邮件地址不会被公开。 必填项已用*标注