From 9e9486f9f9dd44ce8bd70d5d7740245e4f4d3058 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 10 Aug 2023 14:48:27 +0800 Subject: [PATCH] 1 --- webapp/controller/UserController.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 67f35d87..c8234006 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -806,9 +806,15 @@ class UserController extends BaseAuthedController { die(); return; } - User::Update(array( - 'address' => $rspObj['data']['address'] - )); + $address = strtolower($rspObj['data']['address']); + $oldUser = User::findByAddress($address); + if ($oldUser) { + + } else { + User::Update(array( + 'address' => $address + )); + } $propertyChgService = new services\PropertyChgService(); $propertyChgService->addUserChg(); $this->_rspData(array(