##// END OF EJS Templates
Don't use && return....
Jean-Philippe Lang -
r10991:e355a55e3c69
parent child
Show More
@@ -44,7 +44,7 class AccountController < ApplicationController
44 44
45 45 # Lets user choose a new password
46 46 def lost_password
47 redirect_to(home_url) && return unless Setting.lost_password?
47 (redirect_to(home_url); return) unless Setting.lost_password?
48 48 if params[:token]
49 49 @token = Token.find_by_action_and_value("recovery", params[:token].to_s)
50 50 if @token.nil? || @token.expired?
@@ -94,7 +94,7 class AccountController < ApplicationController
94 94
95 95 # User self-registration
96 96 def register
97 redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration]
97 (redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration]
98 98 if request.get?
99 99 session[:auth_source_registration] = nil
100 100 @user = User.new(:language => current_language.to_s)
@@ -176,7 +176,7 class AccountController < ApplicationController
176 176 user = User.find_or_initialize_by_identity_url(identity_url)
177 177 if user.new_record?
178 178 # Self-registration off
179 redirect_to(home_url) && return unless Setting.self_registration?
179 (redirect_to(home_url); return) unless Setting.self_registration?
180 180
181 181 # Create on the fly
182 182 user.login = registration['nickname'] unless registration['nickname'].nil?
@@ -141,7 +141,8 class ProjectsController < ApplicationController
141 141 def show
142 142 if params[:jump]
143 143 # try to redirect to the requested menu item
144 redirect_to_project_menu_item(@project, params[:jump]) && return
144 redirect_to_project_menu_item(@project, params[:jump])
145 return
145 146 end
146 147
147 148 @users_by_role = @project.users_by_role
General Comments 0
You need to be logged in to leave comments. Login now