<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Vivek Khera a écrit :<br>
<blockquote type="cite"
 cite="mid16229.65437.57845.756031@yertle.int.kciLink.com">
  <blockquote type="cite">
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">"RW" == Robert Westendorp <a class="moz-txt-link-rfc2396E" href="mailto:rjwsys@uniserve.com"><rjwsys@uniserve.com></a> writes:
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
  </blockquote>
  <pre wrap=""><!---->RW> Does anyone have a script that will go through and remove users that don't
RW> have any affiliation with any tickets (ie removed dead tickets)? We
RW> currently have about 50000 users (Mostly non-priviledged users) and was
RW> wondering if anyone had a quick way of cleaning those up.

Sounds like a job for a LEFT JOIN in sql.  Are there any tables that
reference user IDs other than the tickets table?  If so, then you'll
have to chase after those tables and delete as well.</pre>
</blockquote>
Many tables have "CreatorId" and "LastUpdatedBy" fields. You can take a
look in the constraints.mysql file (in RT etc/ directory), searching
for "REFERENCES Users(id)" and I think it worths take look at
Principals too.<br>
<pre class="moz-signature" cols="72">-- 
Guillaume Perréal.

Responsable informatique,
Cemagref, groupement de Lyon,
France.

Tél: (+33) 4.72.20.87.87.
Fax: (+33) 4.78.47.78.75.
Site: <a class="moz-txt-link-freetext" href="http://www.lyon.cemagref.fr/">http://www.lyon.cemagref.fr/</a></pre>
</body>
</html>