I'm developing a client-server software for an enterprise customer. I'm being asked to limit the number of user accounts to a number N. Each user logs in with it's own username/password combination, and the customer's system administrator can create as many accounts as he wants using the Web interface. The web server is under my control.
Note that I'm not talking about the server's concurrent sessions, neither on how many simultaneous sessions each user can have. The goal is to prevent the customer to create more user accounts than the per-user licenses they paid for.
How do I implement this? Is it as easy as hardcoding the number N on the server, and throw an error when creating the N+1 account?