inactive_user_list.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. @author Andre Boivin base code
  5. @author Julio Montoya fixing lot of little details
  6. @todo this script is not ready for a production use that's why
  7. I'm commenting the function delete_inactive_student
  8. * @package chamilo.admin
  9. * script pour effacer les user inactif depuis x temps
  10. */
  11. $cidReset = true;
  12. require_once __DIR__.'/../inc/global.inc.php';
  13. $this_section = SECTION_PLATFORM_ADMIN;
  14. api_protect_admin_script(true);
  15. /**
  16. * Make sure this function is protected because it does NOT check password!
  17. *
  18. */
  19. Display :: display_header($tool_name);
  20. //On sélectionne les user élèves
  21. $sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname ";
  22. $result = Database::query($sql);
  23. while ($row = Database::fetch_array($result)) {
  24. $user_id = $row['user_id'];
  25. // pour chaque élève, on trouve la dernière connexion
  26. //$last_connection_date = UserManager:: delete_inactive_student($user_id, 2, true);
  27. }
  28. Display :: display_footer();