How to set a limit to the maximum number of users/employees ?

Hi Forum,

SugarCRM 6.5.20

I would like to set a limit to the number of users/employees that can be created in a given distribution.

Is there a way that this can be achieved ?

eg. If I set the limit to 50, when the administrator attempts to create the 51st user, it should not work.

Thank you,

BP

  • You can customize the controller at Users module and override the method action_editview. Inside this method you need to check if the $this->bean->id is empty and then count the number of active users. If the number had been reached then you can display an error message.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thank you so much Andre for your guidance.

    Do you have any code examples for me try please.

    It will be great if you have.

    Thanks again Andre, much appreciated.

    Regards,

    BP