|
@@ -44,6 +44,18 @@ class User extends Model
|
|
|
|
|
|
protected static function init()
|
|
|
{
|
|
|
+ self::beforeUpdate(function ($row) {
|
|
|
+ $changed = $row->getChangedData();
|
|
|
+ //如果有修改密码
|
|
|
+ if (isset($changed['real_status'])) {
|
|
|
+ if ($changed['real_status']) {
|
|
|
+ $task_rs = \app\common\model\TaskLog::tofinish($row->id,6);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
/*self::beforeUpdate(function ($row) {
|
|
|
$changed = $row->getChangedData();
|
|
|
//如果有修改密码
|