importLDAP.zentaobiz.php 741 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. if($this->config->edition != 'open' and !empty($_POST))
  3. {
  4. $userLimit = $this->getBizUserLimit('user');
  5. if($userLimit)
  6. {
  7. $userCount = $this->dao->select("COUNT('*') as count")->from(TABLE_USER)->where('deleted')->eq(0)->fetch('count');
  8. $maxLimit = $userCount >= $userLimit;
  9. }
  10. foreach($this->post->add as $i => $add)
  11. {
  12. if(empty($add)) continue;
  13. if(isset($_POST['visions'][$i]))
  14. {
  15. if(!$userLimit) continue;
  16. if(!$maxLimit)
  17. {
  18. $userCount ++;
  19. if($userCount >= $userLimit) $maxLimit = true;
  20. }
  21. else
  22. {
  23. $_POST['add'][$i] = '';
  24. }
  25. }
  26. }
  27. }