|
40 | 40 | from pgweb.profserv.models import ProfessionalService |
41 | 41 |
|
42 | 42 | from .models import CommunityAuthSite, CommunityAuthConsent, SecondaryEmail |
| 43 | +from .models import OAUTH_PASSWORD_STORE |
43 | 44 | from .forms import PgwebAuthenticationForm, ConfirmSubmitForm |
44 | 45 | from .forms import CommunityAuthConsentForm |
45 | 46 | from .forms import SignupForm, SignupOauthForm |
|
55 | 56 |
|
56 | 57 | log = logging.getLogger(__name__) |
57 | 58 |
|
58 | | -# The value we store in user.password for oauth logins. This is |
59 | | -# a value that must not match any hashers. |
60 | | -OAUTH_PASSWORD_STORE = 'oauth_signin_account_no_password' |
61 | | - |
62 | 59 |
|
63 | 60 | def _modobjs(qs): |
64 | 61 | l = list(qs) |
@@ -157,7 +154,7 @@ def profile(request): |
157 | 154 | if request.method == 'POST': |
158 | 155 | # Process this form |
159 | 156 | userform = UserForm(can_change_email, secondaryaddresses, data=request.POST, instance=request.user) |
160 | | - profileform = UserProfileForm(data=request.POST, instance=profile) |
| 157 | + profileform = UserProfileForm(request.user, data=request.POST, instance=profile) |
161 | 158 | secondaryemailform = AddEmailForm(request.user, data=request.POST) |
162 | 159 | if contrib: |
163 | 160 | contribform = ContributorForm(data=request.POST, instance=contrib) |
@@ -202,7 +199,7 @@ def profile(request): |
202 | 199 | else: |
203 | 200 | # Generate form |
204 | 201 | userform = UserForm(can_change_email, secondaryaddresses, instance=request.user) |
205 | | - profileform = UserProfileForm(instance=profile) |
| 202 | + profileform = UserProfileForm(request.user, instance=profile) |
206 | 203 | secondaryemailform = AddEmailForm(request.user) |
207 | 204 | if contrib: |
208 | 205 | contribform = ContributorForm(instance=contrib) |
|
0 commit comments