Foreign keys aren't used in Trac; in the database it actually stores strings. So if you delete a user "superman" then in the ticket it will still store and display the "superman" string and you can still search by it, etc.
I work in an environment with a very high turnover rate, so people come and go every 3 months, so I have some scripts to manage it. When users leave, I disable them by deleting their account records: echo "Removing $dev entirely from $proj" trac-admin $proj permission remove $dev \* sqlite3 $proj/db/trac.db "delete from session where sid='$dev'" sqlite3 $proj/db/trac.db "delete from session_attribute where sid='$dev'" I don't know if this is the "official" way (although I try to use trac-admin as much as possible), but it seems to have worked so far over the last year. Jason Winnebeck -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Shané Sent: Friday, June 08, 2007 2:13 AM To: [email protected] Subject: [Trac] Re: How to disable user accounts Hi sbranden, What is the impact of deleting the user from the DB. Would the old tickets referring to this user still be functional? Like say ... if there was ticket owned by this user which is open ...or maybe it was closed but now we want to reopen (and reassign), would this work? Regards, Shāné On 6/8/07, trac-er <[EMAIL PROTECTED]> wrote: > > Hi Shane, > > I used sqlite3 to perform this operation. > > If you run sqlite3 on you .db file you can then remove the user id by > doing the following (replacing XXXusernameXXX with the user you want > to remove): > > update session set authenticated=0 where sid='XXXusernameXXX' > delete from session where sid='XXXusernameXXX' > delete from session where sid='XXXusernameXXX' > > You need to restart the httpd when you're done: > /etc/init.d/httpd restart > > Hope this works for you. > > > > On Jun 7, 4:34 am, "Shāné" <[EMAIL PROTECTED]> wrote: > > Hello all, > > > > How can we disable user accounts? When a user account is disabled, we would > > like to hide the user id in the owner and assignment list. > > > > Regards, > > Shane > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
