feehi
qq群修改为936448696
- feehi 评论了源码 基于yii2的FeehiCMS
qq群修改为936448696
qq群修改为936448696
- feehi 评论了源码 FeehiCMS基于Yii2完善的后台管理系统
qq群修改为936448696
用户修改的时候,密码会被重置。
在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); }
感谢反馈
建议反馈/问题,到qq群或者github上提才能更快速的看到。- feehi 发表了说说FeehiCMS 2.0.8(yii2 admin restful)持续迭代3年多,第33个版本发布https://github.com/liufee/cms
- feehi 2019-05-07 已签到连续签到1天,获得了5个金钱