Skip to content
Snippets Groups Projects
Verified Commit e2aad0e1 authored by Martin Mladenov's avatar Martin Mladenov
Browse files

Redirect to dashboard after entering programmes

parent ec2b9361
2 merge requests!787Project Forum Release 2.8.2,!774Streamline registration and login process
......@@ -31,13 +31,13 @@ class UserProgrammesController < ApplicationController
url = params[:cont_url]
if url.blank?
# If there is no continuation url, redirect to user_path
redirect_to user_path(current_user)
# If there is no continuation url, redirect to dashboard
redirect_to root_path
elsif url.start_with?('/')
begin
refer_url = URI.parse(url).path
rescue URI::InvalidURIError
refer_url = user_path(current_user)
refer_url = root_path
end
# If the url starts with / then we trust it and we can redirect to it
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment