0

I'm trying to fetch a user's profile before the user account gets deleted.

I'm using the rule 'when user get's deleted' but once it gets deleted i cannot obviously access his profile.

Is there a way to get the profile 'before' the user gets deleted ?

Pulling my hairs out; any ideas ? Thanks folks !

(i'm using drupal 6)

4

I may need a bit more info on what you're trying to access and what conditions or actions you're trying to perform on the deleted user, but I'll give it a shot.

You should have access to the deleted user's data when using the "User has been deleted" trigger. If by profile you mean data connected to the user using something like the Content Profile module, then you may want to instead use the "After deleting content" trigger, since Content Profiles are actually just regular nodes.

If that doesn't help, let me know more specifics on what you're trying to do and I'll see if I can help.

  • Thanks for the reply. Yes I was speaking about the content profile that is bound to the user; when I try to 'fetch' it manually using "content_profile_load('profile', $uid, '', TRUE);" it is actually empty; and it's logic because the user has been deleted and thus the profile too. But I', not sure to understand your point about 'After deleting content'. You mean by not triggering 'user has been deleted' but 'profile has been deleted' ? – Disco Oct 29 '14 at 21:15
  • Yep. In my D6 rules, there's an event called "After deleting content" that allows you to trigger an action based on the content being deleted. In your case, you could add a condition to only trigger the action if the node type is the content profile type, then get the profile data from there and do what you want with it. – anemirovsky Oct 29 '14 at 23:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.