Commit 623c5522 by Greg Price

Merge pull request #1987 from edx/feature/gprice/redirect-if-logged-in

Redirect authenticated users from registration or login to dashboard
parents 4bba6c7d f8539cc2
......@@ -216,6 +216,9 @@ def signin_user(request):
"""
This view will display the non-modal login form
"""
if request.user.is_authenticated():
return redirect(reverse('dashboard'))
context = {
'course_id': request.GET.get('course_id'),
'enrollment_action': request.GET.get('enrollment_action')
......@@ -227,6 +230,9 @@ def register_user(request):
"""
This view will display the non-modal registration form
"""
if request.user.is_authenticated():
return redirect(reverse('dashboard'))
context = {
'course_id': request.GET.get('course_id'),
'enrollment_action': request.GET.get('enrollment_action')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment