Ticket #5605: 5605_EmailCase.diff
File 5605_EmailCase.diff, 986 bytes (added by , 17 years ago) |
---|
-
django/contrib/auth/models.py
108 108 def create_user(self, username, email, password=None): 109 109 "Creates and saves a User with the given username, e-mail and password." 110 110 now = datetime.datetime.now() 111 user = self.model(None, username, '', '', email.strip().lower(), 'placeholder', False, True, False, now, now) 111 email_addr = email.strip() 112 email_user_idx = email.find('@') 113 email_user = email_addr[0:email_user_idx] 114 email_domain = email_addr[email_user_idx:len(email_addr)].lower() 115 email_addr_final = u'%s%s' % (email_user, email_domain) 116 user = self.model(None, username, '', '', email_addr_final, 'placeholder', False, True, False, now, now) 112 117 if password: 113 118 user.set_password(password) 114 119 else: