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);
Activity
Jonathan Reissmueller
created issue -
Jonathan Reissmueller
made changes -
Field | Original Value | New Value |
---|---|---|
Sprint | 5.1.0 Sprint 3 [ 127 ] |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
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: {code:java} $vars['contact_type'] = $this->ifSet($vars['contact_type'], $old_contact->contact_type); {code} To {code:java} $vars['contact_type'] = $this->ifSet($vars['contact_type'], $old_contact->contact_type); $vars['contact_type_id'] = $this->ifSet($vars['contact_type_id'], $old_contact->contact_type_id); {code} |
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: {code:java} $vars['contact_type'] = (isset($vars['contact_type']) ? $vars['contact_type'] : $old_contact->contact_type); {code} To {code:java} $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); {code} |
Jonathan Reissmueller
made changes -
Summary | 2FA doesn't work form custom contact types | 2FA doesn't work for custom contact types |
Jonathan Reissmueller
made changes -
Assignee | Jonathan Reissmueller [ jonathan ] |
Jonathan Reissmueller
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Jonathan Reissmueller
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 10 minutes [ 600 ] | |
Worklog Id | 14806 [ 14806 ] |
Jonathan Reissmueller
made changes -
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Jonathan Reissmueller
made changes -
Status | In Review [ 5 ] | Closed [ 6 ] |