mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Set c.user when logging in
This fixes an issue with PostController.login where we didn't know the user's HTTPS preferences at the point when they logged in
This commit is contained in:
committed by
Neil Williams
parent
b4df9a6781
commit
1d148afbe1
@@ -517,6 +517,8 @@ class ApiController(RedditController):
|
||||
AJAX login handler, used by both login and register to set the
|
||||
user cookie and send back a redirect.
|
||||
"""
|
||||
c.user = user
|
||||
c.user_is_loggedin = True
|
||||
self.login(user, rem = rem)
|
||||
|
||||
if request.params.get("hoist") != "cookie":
|
||||
@@ -608,7 +610,6 @@ class ApiController(RedditController):
|
||||
if any(reject):
|
||||
return
|
||||
|
||||
c.user = user
|
||||
self._login(responder, user, rem)
|
||||
|
||||
@cross_domain(allow_credentials=True)
|
||||
|
||||
Reference in New Issue
Block a user