登录之后跳到个人主页
This commit is contained in:
parent
244d5165e2
commit
de5dd08b55
|
@ -563,7 +563,7 @@ class ApplicationController < ActionController::Base
|
|||
uri = URI.parse(back_url)
|
||||
# do not redirect user to another host or to the login or register page
|
||||
if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
|
||||
back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s)
|
||||
back_url = back_url.gsub(%r{\/users\/(\d+)},"/users/"+default.id.to_s) if default.is_a?(:User)
|
||||
redirect_to(back_url)
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue