From efdeeff358e774d121f123731a88f10c3aa32e7e Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Tue, 11 Mar 2008 10:38:14 -0500 Subject: [PATCH] log when users change email --- fas/fas/user.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fas/fas/user.py b/fas/fas/user.py index 7d0cead..e55e162 100644 --- a/fas/fas/user.py +++ b/fas/fas/user.py @@ -257,7 +257,12 @@ class User(controllers.Controller): # FIXME: WARNING! This is deceptive. Remember that it # changes the email object itself, not the email attached # to the purpose. - target.emails['primary'] = email + if not target.emails['primary'] == email: + ''' Log this ''' + oldEmail = target.emails['primary'] + Log(author_id=person.id, description='Email changed from %s to %s' % (oldEmail, email)) + target.emails['primary'] = email + # target.emails['bugzilla'] = bugzilla target.ircnick = ircnick target.gpg_keyid = gpg_keyid