Skip to Content Skip to Menu

CB Auto Actions: Get the user id after an user was deleted

  • startup
  • startup
  • OFFLINE
  • Posts: 113
  • Thanks: 7
  • Karma: 1
  • Add-ons
9 years 10 months ago #254980 by startup
Hello!

The CB Auto Actions Plugin (6.1.1) does support the trigger "After User delete". Is it possible to get not only notified that a particular user was deleted but also to get via the trigger somehow the corresponding userid? I would need this information do some more cleanups with other Joomla components for that particular user which I like to do via sql queries. But for this I would need the corresponding user id which I would like to use in my cleanup queries . i.e. cleanup some thinks in K2 or cleanup some AceSEF Urls for for the deleted user.

Any hint is more than welcome

Cheers
Frank

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48495
  • Thanks: 8284
  • Karma: 1443
9 years 10 months ago - 9 years 10 months ago #255016 by krileon
You can actually get their entire profile data as the object exists in memory and is sent to CB Auto Actions via the trigger. You however can't use any actions or behavior that might reload the user object or query the user in database as they don't exist in the database anymore.

So you'll want to use [var#_VARIABLE] type usage to access the variable directly. For that trigger the user object is specifically in variable 1. So you could do the following.

[var1_id]
[var1_username]
[var1_email]

The below may also still work as long as the user object isn't reloaded.

[user_id]
[username]


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 9 years 10 months ago by krileon.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum