summaryrefslogtreecommitdiff
path: root/users/app
diff options
context:
space:
mode:
Diffstat (limited to 'users/app')
-rw-r--r--users/app/controllers/users_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index ad51354..9325bc0 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -34,7 +34,7 @@ class UsersController < ApplicationController
@user.attributes = params[:user]
if @user.changed? and @user.save
flash[:notice] = t(:user_updated_successfully)
- elsif !@user.email_aliases.last.valid?
+ elsif @user.email_aliases.last and !@user.email_aliases.last.valid?
@email_alias = @user.email_aliases.pop
end
respond_with @user, :location => edit_user_path(@user, :anchor => @anchor)