Skip to Content Skip to Menu

onUser events no longer appear to work from site back end

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 224
  • Thanks: 29
  • Karma: 11
7 years 4 days ago #297350 by bascherz
I wrote a custom CB plugin years ago that uses a bunch of the event handlers that were defined in the API documentation back in 2012. Among them are events such as onBeforeUserUpdate and onAfterUserUpdate. These have always had the same affect whether editing a user profile from the front end or back end of the site. This was working back in June, which was the last time I worked on the code. I am not sure when it happened, but my plugin no longer does what it's supposed to do when editing profile data from the site back end. I am of the belief that the events are no longer triggering when updating a profile in the back end. Did the rules change? Are there now separate events for back end operations?

I'd appreciate any insight from anyone.

Thanks,
Bruce

______________________
Bruce S - Vienna, VA

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48314
  • Thanks: 8253
  • Karma: 1443
7 years 1 day ago #297402 by krileon
A list of triggers and their variables can be found below.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18358-using-cb-triggers

You'll have to debug your own code for as to why it's not working.


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.
The following user(s) said Thank You: bascherz

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

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 224
  • Thanks: 29
  • Karma: 11
7 years 11 hours ago #297435 by bascherz
This code has been working for over a decade, a testament to the stability of the CB framework. It just stopped working recently with no changes to it having been made. Again, it works as it should when modifying user profiles from the site front end, but not from the back end. The same triggers are supposed to work for both, right?

______________________
Bruce S - Vienna, VA

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48314
  • Thanks: 8253
  • Karma: 1443
7 years 7 hours ago #297464 by krileon

The same triggers are supposed to work for both, right?

No, the backend trigger is different from frontend. The backend trigger is onAfterUpdateUser while frontend is onAfterUserUpdate. They have the same 3 variables though so there's no concern with pointing both triggers to same function if needed.


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.
The following user(s) said Thank You: bascherz

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

  • bascherz
  • bascherz
  • OFFLINE
  • Posts: 224
  • Thanks: 29
  • Karma: 11
7 years 6 hours ago - 6 years 11 months ago #297466 by bascherz
Well, that's helpful but I believe the first I've heard of it. Maybe I'm just lucky it's been working all these years. Thanks a bunch!

EDIT: Well, now this is embarrassing... Just looked 6 revisions back and sure enough, I deleted those event registrations. I have no idea why. All is right in the world again. :)

______________________
Bruce S - Vienna, VA
Last edit: 6 years 11 months ago by bascherz.

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

Moderators: beatnantkrileon
Powered by Kunena Forum