mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Redirect to /login-preferences didn't work for subfolders
This commit is contained in:
@@ -238,8 +238,8 @@ class UsersController < ApplicationController
|
|||||||
raise Discourse::NotFound if params[:path] !~ /^[a-z_\-\/]+$/
|
raise Discourse::NotFound if params[:path] !~ /^[a-z_\-\/]+$/
|
||||||
|
|
||||||
if current_user.blank?
|
if current_user.blank?
|
||||||
cookies[:destination_url] = "/my/#{params[:path]}"
|
cookies[:destination_url] = path("/my/#{params[:path]}")
|
||||||
redirect_to "/login-preferences"
|
redirect_to path("/login-preferences")
|
||||||
else
|
else
|
||||||
redirect_to(path("/u/#{current_user.username}/#{params[:path]}"))
|
redirect_to(path("/u/#{current_user.username}/#{params[:path]}"))
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user