zaiyuan
- zaiyuan 提出了问题乐观锁在接口里使用的问题
- zaiyuan 评论了教程 FeehiCMS 2.0正式版发布
用户修改的时候,密码会被重置。
在User模型 beforesave方法改成
public function beforeSave($insert){ if ($insert) { $this->generateAuthKey(); $this->setPassword($this->password); }else{ if( !empty($this->password) && empty($this->repassword) ){ $this->addError("repassword", Yii::t('yii', '{attribute} must be equal to "{compareValueOrAttribute}".', [ 'attribute' => yii::t('app', 'Repeat Password'), 'compareValueOrAttribute' => yii::t('app', 'Password') ]) ); return false; } if(!empty($this->password) && !empty($this->repassword)){ $this->setPassword( $this->password ); } } Util::handleModelSingleFileUpload($this, 'avatar', $insert, '@frontend/web/uploads/avatar/'); return parent::beforeSave($insert); }
- zaiyuan 评论了教程 FeehiCMS 2.0正式版发布
怎样使用gii呢,我都打不开界面
- zaiyuan 赞了评论
这真是一个宝藏啊!谢谢了
- zaiyuan 评论了教程 最全 Yii2 文档资料整理
这真是一个宝藏啊!谢谢了
- zaiyuan 收藏了教程最全 Yii2 文档资料整理
- zaiyuan 赞了说说学生:到XX的卧铺还有吗?售票员:没有了。学生:硬座呢?售票员:也没有了。学生:站票还有吗?售票员:有,但不售学生票。学生:为什么?售票员:铁道部说了,今年不让一个学生站着