DragonByte Tech
Well-known member
Can you please implement a getter for $userId in this service?
Use case scenario:
You have a table that stores purchased licenses. You've implemented the Custom Fields feature to let admins create & users fill out information about their purchase (such as the URL they want to host it on), and these fields go in their own table.
If you simply append the license table to the $deletes array, then the "license_field_value" table will contain orphan entries.
Extending the _postDelete function is a sub-optimal solution because (as per XF's own code), that function is only meant to trigger quick deletes before the enqueued cron job takes care of the more computationally expensive deletes.
Not exposing the $userId in that service means we're forced to possibly delay page loads for admins when it shouldn't be needed.
Fillip
Use case scenario:
You have a table that stores purchased licenses. You've implemented the Custom Fields feature to let admins create & users fill out information about their purchase (such as the URL they want to host it on), and these fields go in their own table.
If you simply append the license table to the $deletes array, then the "license_field_value" table will contain orphan entries.
Extending the _postDelete function is a sub-optimal solution because (as per XF's own code), that function is only meant to trigger quick deletes before the enqueued cron job takes care of the more computationally expensive deletes.
Not exposing the $userId in that service means we're forced to possibly delay page loads for admins when it shouldn't be needed.
Fillip
Upvote
0