mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
fix duplicate auth_token in development database images
This commit is contained in:
@@ -13,7 +13,7 @@ module CurrentUser
|
||||
|
||||
def log_on_user(user)
|
||||
session[:current_user_id] = user.id
|
||||
unless user.auth_token
|
||||
unless user.auth_token && user.auth_token.length == 32
|
||||
user.auth_token = SecureRandom.hex(16)
|
||||
user.save!
|
||||
end
|
||||
|
Reference in New Issue
Block a user