max 10 달 전
부모
커밋
ed5e272a6f
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      frontendApi/modules/v1/controllers/UserController.php

+ 6 - 1
frontendApi/modules/v1/controllers/UserController.php

@@ -627,7 +627,12 @@ SQL;
             $allData['data'][] = $post;
             if ($formModel->load($allData, '') && $result = $formModel->add()) {
                 //发送邮件
-                Email::sendRegistrationEmail($post['email'], $post['insertUserName'], $post['password']);
+                try {
+                    Email::sendRegistrationEmail($post['email'], $post['insertUserName'], $post['password']);
+                } catch (\Exception $e) {
+                    //Yii::error($e->getMessage());
+                    Yii::$app->log->info('邮箱:'.$post['email'].'----错误信息:'.$e->getMessage());
+                }
                 return static::notice($result);//报单成功
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()),400);