Skip to Content Skip to Menu

[SOLVED] Auto Increment

  • jeffyg
  • jeffyg
  • OFFLINE
  • Posts: 15
  • Thanks: 0
  • Karma: 0
9 years 10 months ago #255319 by jeffyg
Replied by jeffyg on topic Auto Increment
Thanks

It increments value for "After User Confirms" trigger

but for all other triggers it just picks up the number and updates the same number (it doesn't increment)

I need it to increment on "After User Approval" trigger

Appreciate your help

Regards,
Jeffy

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
9 years 10 months ago #255366 by krileon
Replied by krileon on topic Auto Increment
The user actually exists in the database so ideally you should be using the after frontend and backend registration triggers. This ensures when they're registered they're incremented correctly.

How are you approving the user? Frontend? Backend user management toggle? Editing them in backend?


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.

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

  • jeffyg
  • jeffyg
  • OFFLINE
  • Posts: 15
  • Thanks: 0
  • Karma: 0
9 years 10 months ago #255399 by jeffyg
Replied by jeffyg on topic Auto Increment
Hi,

I am changing "Approve User" status using CB User Management(backend)

Regards,
Jeffy

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
9 years 10 months ago #255401 by krileon
Replied by krileon on topic Auto Increment
That fires the before and after triggers for user approval, but right after that trigger a user object store() is called. Which means your changes directly to database will be lost. The reason for this is you're not modifying the user object reference, which is being stored and has no idea you've made a change to the database directly. You could try using onUserActive trigger, which is fired after the user store when the user becomes activated.


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.

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

  • jeffyg
  • jeffyg
  • OFFLINE
  • Posts: 15
  • Thanks: 0
  • Karma: 0
9 years 10 months ago #255408 by jeffyg
Replied by jeffyg on topic Auto Increment
Hi,

I am not able to find "onUserActive" trigger

Is it "Before User Active" trigger?

Regards,
Jeffy

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48482
  • Thanks: 8283
  • Karma: 1443
9 years 10 months ago #255409 by krileon
Replied by krileon on topic Auto Increment
Just start typing onUserActive or copy and paste it then press enter. The triggers usage is tag based so you can add new values. If the trigger already exists in the dropdown when you press enter it'll properly select it.


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.

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

Moderators: beatnantkrileon
Powered by Kunena Forum