wesmiler %!s(int64=2) %!d(string=hai) anos
pai
achega
b6175b570c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app/Services/Api/MemberService.php

+ 2 - 2
app/Services/Api/MemberService.php

@@ -748,8 +748,8 @@ class MemberService extends BaseService
             // 修改邮箱
             $newEmail = isset($params['new_email'])? trim($params['new_email']) : '';
             if(isset($params['new_email']) && $newEmail){
-                $data['email'] = $email;
-                $data['username'] = $email;
+                $data['email'] = $newEmail;
+                $data['username'] = $newEmail;
                 $checkInfo = $this->model->where(['username' => $newEmail, 'mark' => 1])->select(['id', 'status'])->first();
                 if ($checkInfo && $checkInfo['id'] != $userId) {
                     $this->error = 2005;