|
|
|
@ -130,7 +130,7 @@ class MyController < ApplicationController
|
|
|
|
|
@user.pref.save
|
|
|
|
|
@user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
|
|
|
|
|
set_language_if_valid @user.language
|
|
|
|
|
flash[:notice] = l(:notice_account_updated)
|
|
|
|
|
flash.now[:notice] = l(:notice_account_updated)
|
|
|
|
|
redirect_to user_path(@user)
|
|
|
|
|
return
|
|
|
|
|
else
|
|
|
|
@ -160,7 +160,7 @@ class MyController < ApplicationController
|
|
|
|
|
@user.destroy
|
|
|
|
|
if @user.destroyed?
|
|
|
|
|
logout_user
|
|
|
|
|
flash[:notice] = l(:notice_account_deleted)
|
|
|
|
|
flash.now[:notice] = l(:notice_account_deleted)
|
|
|
|
|
end
|
|
|
|
|
redirect_to home_path
|
|
|
|
|
end
|
|
|
|
@ -170,7 +170,7 @@ class MyController < ApplicationController
|
|
|
|
|
def password
|
|
|
|
|
@user = User.current
|
|
|
|
|
unless @user.change_password_allowed?
|
|
|
|
|
flash[:error] = l(:notice_can_t_change_password)
|
|
|
|
|
flash.now[:error] = l(:notice_can_t_change_password)
|
|
|
|
|
redirect_to my_account_path
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|