From aad4e06ca6953d7590675e983d8bc70cf002ce4c Mon Sep 17 00:00:00 2001 From: wumo Date: Thu, 15 Mar 2018 11:06:43 +0800 Subject: [PATCH] * roll back the config file. * Check the legality of the mailbox when edit profile. --- config/config.php | 2 +- module/user/model.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.php b/config/config.php index 9491d00dab..33043520f5 100644 --- a/config/config.php +++ b/config/config.php @@ -8,7 +8,7 @@ * * May you do good and not evil. * May you find forgiveness for yourself and forgive others. - * you share freely, never taking more than you give. + * May you share freely, never taking more than you give. */ /* 保证在命令行环境也能运行。Make sure to run in ztcli env. */ diff --git a/module/user/model.php b/module/user/model.php index 42335a2b0d..9f1975e0ed 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -383,6 +383,7 @@ class userModel extends model ->batchCheck($this->config->user->edit->requiredFields, 'notempty') ->check('account', 'unique', "id != '$userID'") ->check('account', 'account') + ->checkIF($this->post->email != '', 'email', 'email') ->where('id')->eq((int)$userID) ->exec();