Skip to content

Commit

Permalink
[#3012] Fix logging in with unautorized user
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Nov 9, 2012
1 parent bc73ed9 commit 18b3018
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckan/controllers/user.py
Expand Up @@ -123,7 +123,10 @@ def me(self, locale=None):
if not c.user:
h.redirect_to(locale=locale, controller='user', action='login',
id=None)
user_ref = c.userobj.get_reference_preferred_for_uri()
if c.unauthorized_userobj:
user_ref = c.unauthorized_userobj.get_reference_preferred_for_uri()
else:
user_ref = c.userobj.get_reference_preferred_for_uri()
h.redirect_to(locale=locale, controller='user', action='dashboard',
id=user_ref)

Expand Down

0 comments on commit 18b3018

Please sign in to comment.