Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.0.4
-
Component/s: None
-
Labels:None
Description
To reproduce:
- Visit Settings > Company > General > Contact Types and add a custom contact type
- Visit an admin client profile page and click "Add Contact" to create a contact of the new type
- Be sure to enable login
- Login as the new contact
- Try to enable 2FA for the account
- Receive the validation error "Invalid contact type ID"
To resolve, in app/models/contacts.php in the adjustInput() method, change:
$vars['contact_type'] = (isset($vars['contact_type']) ? $vars['contact_type'] : $old_contact->contact_type);
To
$vars['contact_type'] = (isset($vars['contact_type']) ? $vars['contact_type'] : $old_contact->contact_type); $vars['contact_type_id'] = (isset($vars['contact_type_id']) ? $vars['contact_type_id'] : $old_contact->contact_type_id);