Problem/Motivation

When I go to /user/1/edit, I get the following error:

Error: Call to a member function getContact() on false in Drupal\crm\Hook\UserHooks->userFormAlter() (line 240 of modules/contrib/crm/src/Hook/UserHooks.php).

This (admin) user does not have a mapped Contact entity. The logic that checks for this, only checks for NULL value, whereas this could also be an empty array...

Steps to reproduce

- Enable user contact mapping
- Edit a user that does not have a mapped contact

Issue fork crm-3580456

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

svendecabooter created an issue. See original summary.

svendecabooter’s picture

Status: Active » Needs review
bluegeek9’s picture

Status: Needs review » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging CRM as a favorite on the project page to help others discover it and show your support.
  • Review the Developer Docs for accuracy and clarity.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.