From c55c6156d8b7803a3bea5fe9644efcdaef5c7a58 Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Mon, 15 Sep 2014 17:32:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E6=96=99=E6=97=A0?= =?UTF-8?q?=E6=95=88=E7=9A=84=E7=94=A8=E6=88=B7=E6=98=B5=E7=A7=B0=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/my_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 32ae2efc2..1e58c53f1 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -75,6 +75,7 @@ class MyController < ApplicationController # Edit user's account def account @user = User.current + lg=@user.login @pref = @user.pref diskfile = disk_filename('User', @user.id) diskfile1 = diskfile + 'temp' @@ -137,7 +138,7 @@ class MyController < ApplicationController if File.exist?(diskfile1) File.delete(diskfile1) end - @user + @user.login = lg end else # 确保文件被删除