inactive_user_list.php 1.1 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. // name of the language file that needs to be included
  11. $language_file = array ('registration','admin');
  12. $cidReset = true;
  13. require_once '../inc/global.inc.php';
  14. $this_section = SECTION_PLATFORM_ADMIN;
  15. api_protect_admin_script(true);
  16. /** INIT SECTION
  17. */
  18. Display :: display_header($tool_name, "");
  19. //On sélectionne les user élèves
  20. $sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname " ;
  21. $result = Database::query($sql);
  22. while($row = Database::fetch_array($result)) {
  23. $user_id = $row['user_id'];
  24. // pour chaque élève, on trouve la dernière connexion
  25. //$last_connection_date = UserManager:: delete_inactive_student($user_id, 2, true);
  26. }
  27. /* FOOTER */
  28. Display :: display_footer();