diff --git a/app/controllers/profile_controller.rb b/app/controllers/profile_controller.rb index 1608b563280..02b155f9253 100644 --- a/app/controllers/profile_controller.rb +++ b/app/controllers/profile_controller.rb @@ -3,8 +3,8 @@ class ProfileController < ApplicationController def show @user = User.find_by_login(params[:user_id]) if @user.nil? - flash[:error] = t('invalid_user', :default => "Sorry, there's no user by that name.") - redirect_to '/' + flash[:error] = ts("Sorry, there's no user by that name.") + redirect_to '/' and return elsif @user.profile.nil? Profile.create(:user_id => @user.id) @user.reload