![](https://www.deaboway.com/wp-content/uploads/2019/08/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f323837313234382f313337353131332f66343238393133652d336137622d313165332d386462332d6337646465363238313533332e6a7067-768x1024.jpeg)
解决方法如下:
ALTER TABLE `user` ADD PRIMARY KEY(`id`);
- 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