Bug Report for SampleLicenseAddon-ExternalResourceClient.zip

I would like to report a bug in SampleLicenseAddon-ExternalResourceClient.zip version 1.9, which is available at https://www.sugaroutfitters.com/selling/license

The issue is with Managing Users

If the original license was for a higher number of licenses and they reduced the number of licenses. It's not possible to remove users. The issue is inside of the function get_default_payload. The code says

$sql = "SELECT count(*) as the_count FROM so_users WHERE shortname = '".$db->quote($outfitters_config['shortname'])."'";

 where is should be obtaining the number of license users from the body of the POST. 

Since the code incorrectly is counting the number of users in the so_users table. We are unable to reduce the number of users Disappointed

 

Parents
  •  Hi  ,

    We use so_users table to track which users are "enabled" to use your feature and from there we get the count to check the license against it.

    Our sample code, sends it to our License Server to validate which will return how many seats the license is entitled to and whether that's valid (entitlement <= user_count).

    The proper way to reduce the seats/entitlements in the system is to move the users from "Licensed Users" to "Unlicensed Users" and save. that will force the so_users table to be truncated and re-populated with only the users selected, which in theory will clean up the seats.

    Can you try that?

    SugarCRM | Principal Developer Advocate

Reply
  •  Hi  ,

    We use so_users table to track which users are "enabled" to use your feature and from there we get the count to check the license against it.

    Our sample code, sends it to our License Server to validate which will return how many seats the license is entitled to and whether that's valid (entitlement <= user_count).

    The proper way to reduce the seats/entitlements in the system is to move the users from "Licensed Users" to "Unlicensed Users" and save. that will force the so_users table to be truncated and re-populated with only the users selected, which in theory will clean up the seats.

    Can you try that?

    SugarCRM | Principal Developer Advocate

Children