mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update
This commit is contained in:
parent
ffe7f0b3ec
commit
3d3b46b5e7
@ -53,13 +53,13 @@ class UserController extends Controller
|
|||||||
if (User::where('email', $updateData['email'])->first() && $user->email !== $updateData['email']) {
|
if (User::where('email', $updateData['email'])->first() && $user->email !== $updateData['email']) {
|
||||||
abort(500, '邮箱已被使用');
|
abort(500, '邮箱已被使用');
|
||||||
}
|
}
|
||||||
if ($updateData['password']) {
|
if (isset($updateData['password'])) {
|
||||||
$updateData['password'] = password_hash($updateData['password'], PASSWORD_DEFAULT);
|
$updateData['password'] = password_hash($updateData['password'], PASSWORD_DEFAULT);
|
||||||
} else {
|
} else {
|
||||||
unset($updateData['password']);
|
unset($updateData['password']);
|
||||||
}
|
}
|
||||||
$updateData['transfer_enable'] = $updateData['transfer_enable'] * 1073741824;
|
$updateData['transfer_enable'] = $updateData['transfer_enable'] * 1073741824;
|
||||||
if ($updateData['plan_id']) {
|
if (isset($updateData['plan_id'])) {
|
||||||
$plan = Plan::find($updateData['plan_id']);
|
$plan = Plan::find($updateData['plan_id']);
|
||||||
if (!$plan) {
|
if (!$plan) {
|
||||||
abort(500, '订阅计划不存在');
|
abort(500, '订阅计划不存在');
|
||||||
|
Loading…
Reference in New Issue
Block a user