~barry/mailman/events-and-web

« back to all changes in this revision

Viewing changes to src/mailman/interfaces/user.py

  • Committer: Barry Warsaw
  • Date: 2012-04-07 21:59:30 UTC
  • Revision ID: barry@list.org-20120407215930-921980ym1rt0v0ud
 * A `PasswordChangeEvent` is triggered when an `IUser`'s password changes.
   (LP: #975700)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
__metaclass__ = type
23
23
__all__ = [
24
24
    'IUser',
 
25
    'PasswordChangeEvent',
25
26
    'UnverifiedAddressError',
26
27
    ]
27
28
 
37
38
 
38
39
 
39
40
 
 
41
class PasswordChangeEvent:
 
42
    """Event which gets triggered when a user changes their password."""
 
43
 
 
44
    def __init__(self, user):
 
45
        self.user = user
 
46
 
 
47
    def __str__(self):
 
48
        return '<{0} {1}>'.format(self.__class__.__name__,
 
49
                                  self.user.display_name)
 
50
 
 
51
 
 
52
 
40
53
class IUser(Interface):
41
54
    """A basic user."""
42
55