inactive_user_list.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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 I'm commenting the function delete_inactive_student
  7. * @package chamilo.admin
  8. * script pour effacer les user inactif depuis x temps
  9. */
  10. $cidReset = true;
  11. require_once '../inc/global.inc.php';
  12. $this_section = SECTION_PLATFORM_ADMIN;
  13. api_protect_admin_script(true);
  14. /**
  15. * Make sure this function is protected because it does NOT check password!
  16. *
  17. */
  18. /** INIT SECTION
  19. */
  20. Display :: display_header($tool_name, "");
  21. //On sélectionne les user élèves
  22. $sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname " ;
  23. $result = Database::query($sql);
  24. while($row = Database::fetch_array($result)) {
  25. $user_id = $row['user_id'];
  26. // pour chaque élève, on trouve la dernière connexion
  27. //$last_connection_date = UserManager:: delete_inactive_student($user_id, 2, true);
  28. }
  29. Display :: display_footer();