license = ($license) ? $license : License::getLicense(); $this->installation_time = strtotime($settings->get('installed_at')); $this->subscribers_count = SubscriberModel::getTotalSubscribers(); } function check() { if ($this->license) return false; return $this->subscribers_count > $this->getSubscribersLimit(); } function getSubscribersLimit() { $old_user = $this->installation_time < strtotime(self::NEW_LIMIT_DATE); return $old_user ? self::SUBSCRIBERS_OLD_LIMIT : self::SUBSCRIBERS_NEW_LIMIT; } }