inactive_user_list.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. $tbl_stats_access = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_ACCESS);
  15. $this_section = SECTION_PLATFORM_ADMIN;
  16. api_protect_admin_script(true);
  17. /**
  18. * Make sure this function is protected because it does NOT check password!
  19. *
  20. */
  21. /** INIT SECTION
  22. */
  23. Display :: display_header($tool_name, "");
  24. //On sélectionne les user élèves
  25. $sql = "SELECT user_id FROM ".$table_user." user WHERE user.status= '5' ORDER by lastname " ;
  26. $result = Database::query($sql);
  27. while($row = Database::fetch_array($result)) {
  28. $user_id = $row['user_id'];
  29. // pour chaque élève, on trouve la dernière connexion
  30. //$last_connection_date = UserManager:: delete_inactive_student($user_id, 2, true);
  31. }
  32. /* FOOTER */
  33. Display :: display_footer();