fix unsetting profile fields
This commit is contained in:
parent
d6abd02a3b
commit
705634e189
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ class AccountController extends Controller
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($allowed as $field) {
|
foreach ($allowed as $field) {
|
||||||
$save["user_{$field}"] = $_POST["profile_{$field}"] ?? null;
|
$profile_field = "profile_{$field}";
|
||||||
|
|
||||||
|
$save["user_{$field}"] = isset($_POST[$profile_field]) && strlen($_POST[$profile_field])
|
||||||
|
? $_POST[$profile_field]
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::table('users')
|
DB::table('users')
|
||||||
|
|
Reference in a new issue