13e0bf5c04bf531c04ad9e8b29c85cd82e54d769,apps/reader/forms.py,SignupForm,save,#SignupForm#Any#,111
Before Change
new_user = User(username=username)
new_user.set_password(password)
new_user.is_active = True
new_user.email = self.cleaned_data["email"]
new_user.save()
new_user = authenticate(username=username,
password=password)
After Change
password = self.cleaned_data["password"]
email = self.cleaned_data.get("email", None)
if email:
email_exists = User.objects.filter(email__iexact=email).count()
if email_exists:
raise forms.ValidationError(_(u"Someone is already using that email address."))
exists = User.objects.filter(username__iexact=username).count()
if exists:
user_auth = authenticate(username=username, password=password)
if not user_auth:
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 4
Instances
Project Name: samuelclay/NewsBlur
Commit Name: 13e0bf5c04bf531c04ad9e8b29c85cd82e54d769
Time: 2013-03-20
Author: lgp171188@gmail.com
File Name: apps/reader/forms.py
Class Name: SignupForm
Method Name: save
Project Name: sao-eht/eat
Commit Name: 0663f431d59a7281adf9a69e5cf98cbcab026597
Time: 2018-03-04
Author: lindylam@gmail.com
File Name: eat/io/util.py
Class Name:
Method Name: fix
Project Name: CellProfiler/CellProfiler
Commit Name: 98bbe719fa12ddc2e482162caa9494ec793da52a
Time: 2010-03-09
Author: afraser@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/modules/saveimages.py
Class Name: SaveImages
Method Name: prepare_group
Project Name: GoogleCloudPlatform/professional-services
Commit Name: 6fe18a1abf668c0346c3e1250fbddf223e280873
Time: 2020-01-29
Author: ocervello@google.com
File Name: tools/slo-generator/slo_generator/backends/stackdriver.py
Class Name: StackdriverBackend
Method Name: good_bad_ratio
Project Name: mindsdb/mindsdb
Commit Name: aceaeb71dc6f7313fff18db92a51ae28580667b9
Time: 2020-08-19
Author: stpmax@yandex.ru
File Name: mindsdb/api/mysql/mysql_proxy/data_types/mysql_packets/command_packet.py
Class Name: CommandPacket
Method Name: setup