Update RegisterController.php (#1373)

Get only active and displayed UserFields.
This commit is contained in:
B.Fatih KOZ 2022-01-04 22:29:41 +03:00 committed by GitHub
parent c12cf0964a
commit fd7c1b8314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ class RegisterController extends Controller
Log::info('User registered: ', $user->toArray());
$userFields = UserField::all();
$userFields = UserField::where(['show_on_registration' => true, 'active' => true])->get();
foreach ($userFields as $field) {
$field_name = 'field_'.$field->slug;
UserFieldValue::updateOrCreate([