ldap_import_all_users.php 513 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. *
  7. * @package chamilo.auth.ldap
  8. */
  9. /**
  10. * Init.
  11. */
  12. if (PHP_SAPI != 'cli') {
  13. die('For security reasons, this script can only be launched from cron or from the command line');
  14. }
  15. require __DIR__.'/../../inc/global.inc.php';
  16. require __DIR__.'/ldap.inc.php';
  17. require __DIR__.'/../../inc/conf/auth.conf.php';
  18. /**
  19. * Code execution.
  20. */
  21. extldap_import_all_users();