File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -133,13 +133,25 @@ def auth_receive(request):
133
133
a different username than %s.
134
134
135
135
This is almost certainly caused by some legacy data in our database.
136
- Please send an email to webmaster@postgresql.eu , indicating the username
136
+ Please send an email to webmaster@postgresql.org , indicating the username
137
137
and email address from above, and we'll manually merge the two accounts
138
138
for you.
139
139
140
140
We apologize for the inconvenience.
141
141
""" % (data ['e' ][0 ], data ['u' ][0 ]), content_type = 'text/plain' )
142
142
143
+ if getattr (settings , 'PGAUTH_CREATEUSER_CALLBACK' , None ):
144
+ res = getattr (settings , 'PGAUTH_CREATEUSER_CALLBACK' )(
145
+ data ['u' ][0 ],
146
+ data ['e' ][0 ],
147
+ ['f' ][0 ],
148
+ data ['l' ][0 ],
149
+ )
150
+ # If anything is returned, we'll return that as our result.
151
+ # If None is returned, it means go ahead and create the user.
152
+ if res :
153
+ return res
154
+
143
155
user = User (username = data ['u' ][0 ],
144
156
first_name = data ['f' ][0 ],
145
157
last_name = data ['l' ][0 ],
You can’t perform that action at this time.
0 commit comments