~rashi007/mailman/docsfix

« back to all changes in this revision

Viewing changes to src/mailman/model/usermanager.py

  • Committer: Barry Warsaw
  • Date: 2015-02-06 03:04:45 UTC
  • Revision ID: barry@list.org-20150206030445-yu808dw9pyzr2exd
 * When creating a user with an email address, do not create the user record
   if the email address already exists.  Given by Andrew Stuart.
   (LP: #1418280)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    def create_user(self, email=None, display_name=None):
41
41
        """See `IUserManager`."""
 
42
        if email:
 
43
            address = self.create_address(email, display_name)
42
44
        user = User(display_name, Preferences())
43
45
        if email:
44
 
            address = self.create_address(email, display_name)
45
46
            user.link(address)
46
47
        return user
47
48