Yes you can do this, but you will write simple plugin based on our Skeleton plugin.
here a plugin and documentation of our Triggers
https://www.easy-profile.com/docs/44-triggers.html
You can do something like this:
- Download, install, and enable our Skeleton plugin
- Go on file /plugins/jsn/skeleton/skeleton.php
- delete examples functions triggerFieldAvatarUpdate and triggerProfileUpdate
- write a function like this
triggerProfileUpdate($user,&$data,$changed,$isNew){
// Recognize last customer id
$query="SELECT customer_id FROM #__jsn_users ORDER BY customer_id DESC LIMIT 1"
$db=JFactory::getDbo();
$db->setQuery($query);
$last_customer_id=$db->loadResult();
// Increment customer id value
$new_customer_id=$last_customer_id+1;
// Fill the data variable to store it in DB
$data['customer_id']=$new_customer_id;
}
NOTE: this code is not tested and not supported and require minimum PHP knowledge