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(