mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 08:07:17 +08:00
FIX: Store user's id instead for sending activation email.
* Email and username are both allowed to be used for logging in. Therefore, it is easier to just store the user's id rather than to store the username and email in the session.
This commit is contained in:
@ -278,7 +278,7 @@ class SessionController < ApplicationController
|
||||
end
|
||||
|
||||
def not_activated(user)
|
||||
session[ACTIVATE_USER_KEY] = user.username
|
||||
session[ACTIVATE_USER_KEY] = user.id
|
||||
render json: {
|
||||
error: I18n.t("login.not_activated"),
|
||||
reason: 'not_activated',
|
||||
|
Reference in New Issue
Block a user