mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-16 05:52:49 +00:00
fix: 部分情况出现注册失败
This commit is contained in:
parent
bfe359c440
commit
db6b571cfb
@ -228,6 +228,14 @@ class Doo
|
|||||||
if (Base::isError($data)) {
|
if (Base::isError($data)) {
|
||||||
throw new ApiException($data['msg'] ?: '注册失败');
|
throw new ApiException($data['msg'] ?: '注册失败');
|
||||||
}
|
}
|
||||||
|
if (\DB::transactionLevel() > 0) {
|
||||||
|
try {
|
||||||
|
\DB::commit();
|
||||||
|
\DB::beginTransaction();
|
||||||
|
} catch (\Throwable) {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
$user = User::whereEmail($email)->first();
|
$user = User::whereEmail($email)->first();
|
||||||
if (empty($user)) {
|
if (empty($user)) {
|
||||||
throw new ApiException('注册失败');
|
throw new ApiException('注册失败');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user