futurefirst / uk.org.futurefirst.networks.civipoints

An extension for CiviCRM. Allows points to be allocated to contacts.
Other
1 stars 6 forks source link

CiviRule fails with anonymous user (e.g. online donation) #24

Open MegaphoneJon opened 2 years ago

MegaphoneJon commented 2 years ago

I had a CiviRule set up to grant a point to anyone who makes a contribution.

Unfortunately, this caused an error because the CiviRule doesn't specify the grantor_contact_id - it relies on using the ID of the logged-in user. Which, for a typical online contribution, is no one.

However, I looked at the rest of the code and the database structure and saw no reason for the grantor to be a required field - and in fact if you delete a grantor, the database will set the grantor id to NULL.