Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4194

2FA doesn't work for custom contact types

    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

        There are no comments yet on this issue.

          People

          • Assignee:
            jonathan Jonathan Reissmueller
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Apr/21

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 10 minutes
              10m

                Agile