SYDA Developer LV
The only customers that should exist on our site should be attached to a user account. At present, when an account is deleted in CMS Desk, the customer that was attached to the user is not deleted.
This is not a problem.
The problem is that we have attempted to write a custom global event handler to delete the customer when a user is deleted. Unfortunately, the customer's CustomerUserID property is given a value of null before an event handler that triggers on UserInfo.TYPEINFO.Events.Delete.Before can fire, and so we are unable to find the customer associated with the user using CustomerInfoProvider.GetCustomerInfoByUserID. While a conversation with Kentico support has convinced me that our only options are to add a column to the CMS_User table and/or customer table OR to use CustomerInfoProvider.GetCustomers, I was wondering if anyone had been able to find another solution to the problem. I'd prefer to not use either method, to be honest, but I may end up using GetCustomers if I have to.
The only customers that should exist on our site should be attached to a user account. At present, when an account is deleted in CMS Desk, the customer that was attached to the user is not deleted.
This is not a problem.
The problem is that we have attempted to write a custom global event handler to delete the customer when a user is deleted. Unfortunately, the customer's CustomerUserID property is given a value of null before an event handler that triggers on UserInfo.TYPEINFO.Events.Delete.Before can fire, and so we are unable to find the customer associated with the user using CustomerInfoProvider.GetCustomerInfoByUserID. While a conversation with Kentico support has convinced me that our only options are to add a column to the CMS_User table and/or customer table OR to use CustomerInfoProvider.GetCustomers, I was wondering if anyone had been able to find another solution to the problem. I'd prefer to not use either method, to be honest, but I may end up using GetCustomers if I have to.