Vilma_Driver::isBelowMaxUsers PHP Method

isBelowMaxUsers() public method

Checks if the given domain is below the maximum allowed users.
public isBelowMaxUsers ( string $domain ) : boolean
$domain string The domain name to check.
return boolean True if the domain does not have a maximum limit (0) or current number of users is below the maximum number allowed.
    public function isBelowMaxUsers($domain)
    {
        /* Get the maximum number of users for this domain. */
        $max_users = $this->getDomainMaxUsers($domain);
        if (!$max_users) {
            /* No maximum. */
            return true;
        }
        /* Get the current number of users. */
        return $this->getDomainNumUsers($domain) < $max_users;
    }