Check for active flag for user fields in registration
This commit is contained in:
parent
3ac03d9716
commit
4f46e75515
@ -92,7 +92,12 @@ class RegisterController extends Controller
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Dynamically add the required fields
|
// Dynamically add the required fields
|
||||||
$userFields = UserField::where(['show_on_registration' => true, 'required' => true])->get();
|
$userFields = UserField::where([
|
||||||
|
'show_on_registration' => true,
|
||||||
|
'required' => true,
|
||||||
|
'active' => true,
|
||||||
|
])->get();
|
||||||
|
|
||||||
foreach ($userFields as $field) {
|
foreach ($userFields as $field) {
|
||||||
$rules['field_'.$field->slug] = 'required';
|
$rules['field_'.$field->slug] = 'required';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user