Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have some users that have left the company and we have suspended their e-mail address, but trac continues to send notifications to these addresses. How can I remove the e-mail address from their trac profile?

share|improve this question

3 Answers 3

You could go into the database and update the record:

 DELETE FROM session_attribute WHERE name = 'email' AND value = 'email@example.com';

If you're using sqlite, it would be something like "sqlite3 trac.db", where trac.db is under your trac directory somewhere.

In addition, in trac.ini there are settings for automatically emailing changes and tickets.

always_notify_owner = true
always_notify_reporter = true
always_notify_updater = true

If the person is still on tickets as one of those three, they will continue to get emails if the trac username is the first part of their email address and the setting "smtp_default_domain" matches the domain part.

share|improve this answer
    
I see the trac.db, but sqlite3 isn't an executable -- I only have a sqlite3.dll. How do I execute the query? –  g . Jul 27 '09 at 16:02
1  
Download the Windows client at sqlite.org/download.html –  Gavin M. Roy Jul 28 '09 at 22:12

No plugins necessary, if you're comfortable with the command line. TracAdmin is your friend.

List the name and email for the given sids (username):

trac-admin /usr/local/share/trac/test session list

SID      Auth  Last Visit  Name            Email            
------------------------------------------------------------
bob      1     1970-01-01  Bob Smith       bob@bob.com

where /usr/local/share/trac/test is the path to your project.

Now just send the empty string to clear their email address:

trac-admin /usr/local/share/trac/test session set email bob ""

Check that it worked:

trac-admin /usr/local/share/trac/test session list

SID      Auth  Last Visit  Name            Email            
------------------------------------------------------------
bob      1     1970-01-01  Bob Smith                        

Need to set it to something else? No problem:

trac-admin /usr/local/share/trac/test session set email bob "bob@bob.com"

trac-admin /usr/local/share/trac/test session list

SID      Auth  Last Visit  Name            Email            
------------------------------------------------------------
bob      1     1970-01-01  Bob Smith       bob@bob.com 
share|improve this answer
up vote 2 down vote accepted

Another approach that I found is to use the UserManagerPlugin. The "User Session Management" provides the functionality to remove old users from the system.

After installing the plugin,

  1. Select Admin -> Users -> Session Management
  2. Tick the boxes of the users to be removed and click 'Delete Selected'
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.