This commit is contained in:
TL 2022-07-01 10:45:27 +08:00
parent 4135dcb8a8
commit 33f843cc1f
1 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,10 @@ class AccountService
$data['status'] = !setting('approve_customer'); // approve_customer为是否需要审核客户
$data['from'] = $data['from'] ?? 'pc';
$data['locale'] = locale();
$data['name'] = '';
if ($data['email'] ?? 0) {
$data['name'] = substr($data['email'], 0, strrpos($data['email'], '@'));;
}
$data['avatar'] = '';
return CustomerRepo::create($data);