current_user.tokens.delete_all
session[:user] = current_user.id
session[:fingerprint] = current_user.fingerprint
- redirect_to :controller => :users, :action => :account, :display_name => current_user.display_name
+ redirect_to user_account_path(current_user)
elsif token
flash[:error] = t "confirmations.confirm_email.failure"
- redirect_to :controller => :users, :action => :account, :display_name => token.user.display_name
+ redirect_to user_account_path(token.user)
else
flash[:error] = t "confirmations.confirm_email.unknown_token"
end
if current_user&.terms_agreed?
# Already agreed to terms, so just show settings
- redirect_to :action => :account, :display_name => current_user.display_name
+ redirect_to user_account_path(current_user)
elsif current_user.nil? && session[:new_user].nil?
redirect_to login_path(:referer => request.fullpath)
end
if params[:referer]
redirect_to safe_referer(params[:referer])
else
- redirect_to :action => :account, :display_name => current_user.display_name
+ redirect_to user_account_path(current_user)
end
elsif params[:decline]
redirect_to t("users.terms.declined")
if params[:referer]
redirect_to safe_referer(params[:referer])
else
- redirect_to :action => :account, :display_name => current_user.display_name
+ redirect_to user_account_path(current_user)
end
else
self.current_user = session.delete(:new_user)
current_user.data_public = true
current_user.save
flash[:notice] = t "users.go_public.flash success"
- redirect_to :action => "account", :display_name => current_user.display_name
+ redirect_to user_account_path(current_user)
end
def new
session[:user_errors] = current_user.errors.as_json
- redirect_to :action => "account", :display_name => current_user.display_name
+ redirect_to user_account_path(current_user)
elsif session[:new_user]
session[:new_user].auth_provider = provider
session[:new_user].auth_uid = uid
<span class='count-number'><%= number_with_delimiter(current_user.new_messages.size) %></span>
<% end %>
<%= link_to t("users.show.my profile"), user_path(current_user), :class => "dropdown-item" %>
- <%= link_to t("users.show.my settings"), { :controller => "users", :action => "account", :display_name => current_user.display_name }, { :class => "dropdown-item" } %>
+ <%= link_to t("users.show.my settings"), user_account_path(current_user), :class => "dropdown-item" %>
<%= link_to t("users.show.my_preferences"), preferences_path, :class => "dropdown-item" %>
<div class="dropdown-divider"></div>
<%= yield :greeting %>
<p><%= t "layouts.osm_read_only" %></p>
<% elsif !current_user.data_public? %>
<p><%= t ".not_public" %></p>
- <p><%= t ".not_public_description_html", :user_page => (link_to t(".user_page_link"), :controller => "users", :action => "account", :display_name => current_user.display_name, :anchor => "public") %></p>
+ <p><%= t ".not_public_description_html", :user_page => (link_to t(".user_page_link"), user_account_path(current_user, :anchor => "public")) %></p>
<p><%= t ".anon_edits_html", :link => link_to(t(".anon_edits_link_text"), t(".anon_edits_link")) %></p>
<% else %>
<%= render :partial => preferred_editor %>
<%= link_to t(".my comments"), :controller => "diary_entries", :action => "comments", :display_name => current_user.display_name %>
</li>
<li>
- <%= link_to t(".my settings"), :controller => "users", :action => "account", :display_name => current_user.display_name %>
+ <%= link_to t(".my settings"), user_account_path(current_user) %>
</li>
<% if current_user.blocks.exists? %>