Commits

offline  committed 1957672

reset password bugfixes

  • Participants
  • Parent commits 7aec589

Comments (0)

Files changed (3)

File openauth/signals.py

             auth.login(request, user)
             
     elif confirmation_type == openauth.settings.PASSWORD_RESET_TYPE:
+        user = instance
         user.backend = 'django.contrib.auth.backends.ModelBackend'
         auth.login(request, user)    
 

File openauth/urls.py

     url(r'^openid-complete/$', views.openid_complete, name='openauth-openid-complete'),
     url(r'^openid-registration/$', views.openid_registration, name='openauth-openid-registration'),
     url(r'^logout/$', views.logout, name='openauth-logout'),
-    url(r'^reset_password/$', views.reset_password, name='openauth-reset-password'),
-    url(r'^change_password/$', views.change_password, name='openauth-change-password'),
+    url(r'^reset-password/$', views.reset_password, name='openauth-reset-password'),
+    url(r'^change-password/$', views.change_password, name='openauth-change-password'),
     url(r'^user/$', views.show_user, name='openauth-show-user'),
     url(r'^user/(\d+)/$', views.show_user, name='openauth-show-user'),
     url(r'^users/$', views.users, name='openauth-show-users'),

File openauth/views.py

     return {'form': form}
 
 
-@login_required
+@login_required(opposite=True)
 @render_to('openauth/reset_password.html')
 def reset_password(request):
     if request.POST: