Potential problem when deleting users

10 years 1 month ago #104748 by amazeika
You are right DOCman is not doing a great job when the user is deleted, but I think the developer is aware of that and that in his opinion he can live with that. A plugin should be listening fpr this event in order to do the necessary if you want to be rigorous.

The same problem is occurring with CBSubs, which should trigger the expiration/unsubscribe plugin actions when the delete user event occurs. You should realize that CBSubs Docman plugin would be doing Docman's job on removing the users it added (upon subscription) if these actions are executed upon user deletion, which would be THE RIGHT THING TO DO.

I also told you that SQL plugin expiration/unsubscribe actions are not triggered neither when the user is directly deleted. As a developer I expect them to be executed, but it's your application after all.

If CBSubs plugins make modifications on any table when subscribing, and it should do anything when unsubscribing/expiring these actions should also happen if the user is deleted because the subscription is being terminated as well.

Post edited by: amazeika, at: 2009/07/13 22:45

Post edited by: amazeika, at: 2009/07/13 22:46

Arunas Mazeika
WeXtend.com - Professional development for Joomla!.
10 years 1 month ago #104754 by amazeika
In addition to my last post

nant wrote:

When a user unsubscribes, this doesn't mean that the user is removed from the CMS.


What I'm taking about here is exactly the contrary which is true. A user is removed -> subscription is terminated and all its related events should trigger, e.g. plugin actions.

Arunas Mazeika
WeXtend.com - Professional development for Joomla!.
10 years 1 month ago #104755 by nant
amazeika wrote:

You are right DOCman is not doing a great job when the user is deleted, but I think the developer is aware of that and that in his opinion he can live with that. A plugin should be listening fpr this event in order to do the necessary if you want to be rigorous.


DOCman should be listening and should cleanup. Only DOCman knows what housekeeping is needed when a Joomla user is deleted.

We (CB Team) have similar situations in CB Gallery and CB ProfileBook. When a CB user is deleted via the CB User Management backend a CB user delete trigger is fired. Both CB Gallery and CB ProfileBook plugins have functions that are called when such a trigger is fired and do all needed cleanup activities (e.g., CB Gallery removes all files that the deleted user uploaded and also removes relevant entries in its database tables.

Point is -- proper cleanup activities should be performed by system/script that actually created the data.

The same problem is occurring with CBSubs, which should trigger the expiration/unsubscribe plugin actions when the delete user event occurs.


Hmmm, are you saying it doesn't?
What is it doing and how should it respond?
Of course any recurring payments should be stopped, but I am not sure that this can be done from CBSubs side alone,,, [waiting for Beat again here]

You should realize that CBSubs Docman plugin would be doing Docman's job on removing the users it added if these actions are executed upon user deletion, which would be FABULOUS.


Would be wrong. CBSub does remove a user from a DOCman group if so instructed - but it does not (and should not imho) cleanup after DOCman (see my previous reasoning).

I also told you that SQL plugin expiration/unsubscribe actions are not triggered neither when the user is directly deleted. As a developer I expect them to be executed, but it's your application after all.


Once again we need to think this through. Perhaps each CBSubs plugin need to clearly think through what cleanup activities make sense is a user deletion trigger is fired. I am not sure that a user deletion trigger should also fire subscription plan removal triggers apriori.
10 years 1 month ago #104756 by amazeika

Would be wrong. CBSub does remove a user from a DOCman group if so instructed - but it does not (and should not imho) cleanup after DOCman (see my previous reasoning).


I rephrased, since it came out wrong ;). He was instructed to do so when subscribing, so he should remove him.

Post edited by: amazeika, at: 2009/07/13 23:00

Arunas Mazeika
WeXtend.com - Professional development for Joomla!.
10 years 1 month ago #104759 by beat
nant wrote:

Once again we need to think this through. Perhaps each CBSubs plugin need to clearly think through what cleanup activities make sense is a user deletion trigger is fired. I am not sure that a user deletion trigger should also fire subscription plan removal triggers apriori.


CBSubs must keep its records, even if a user is deleted.

That's required by regulations in most countries.

You certainly have a point regarding Docman, but it's really a docman issue to listen to users deletion triggers.

It could be CBSubs, it could be the admin, who adds the user to docman group. Who knows. Most CB integrations do handle user deletion events, where it matters in the end-result. Fortunately, in docman's case, it's not the case :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
10 years 1 month ago #104761 by nant
amazeika wrote:

Would be wrong. CBSub does remove a user from a DOCman group if so instructed - but it does not (and should not imho) cleanup after DOCman (see my previous reasoning).


I rephrased, since it came out wrong ;). He was instructed to do so when subscribing, so he should remove him.

Post edited by: amazeika, at: 2009/07/13 23:00


Sorry, I cannot replicate this.
When I specify in the docman cbsubs integration plugin that a user should be removed from a group upon end of subscription, the user is removed.
Moderators: beatnantkrileon
Time to create page: 0.393 seconds
Facebook Twitter Google LinkedIn