ldap_import_all_users.php 577 B

12345678910111213141516171819202122
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This script executes the importation of all users in the LDAP repository
  5. * into Chamilo
  6. * @package chamilo.auth.ldap
  7. */
  8. /**
  9. * Init
  10. */
  11. if (PHP_SAPI != 'cli') {
  12. die ('For security reasons, this script can only be launched from cron or from the command line');
  13. }
  14. use \ChamiloSession as Session;
  15. require dirname(__FILE__) . '/../../inc/global.inc.php';
  16. require dirname(__FILE__) . '/ldap.inc.php';
  17. require dirname(__FILE__) . '/../../inc/conf/auth.conf.php';
  18. /**
  19. * Code execution
  20. */
  21. extldap_import_all_users();