inactive_user_list.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. use Chamilo\CoreBundle\Framework\Container;
  4. /**
  5. @author Andre Boivin base code
  6. @author Julio Montoya fixing lot of little details
  7. @todo this script is not ready for a production use that's why
  8. I'm commenting the function delete_inactive_student
  9. * @package chamilo.admin
  10. * script pour effacer les user inactif depuis x temps
  11. */
  12. $cidReset = true;
  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();