个人主页
This commit is contained in:
parent
0ef09fee8a
commit
3e3bcc32a6
|
@ -180,6 +180,7 @@ class MyController < ApplicationController
|
|||
|
||||
# Manage user's password
|
||||
def password
|
||||
begin
|
||||
@act='password'
|
||||
@user = User.current
|
||||
unless @user.change_password_allowed?
|
||||
|
@ -196,18 +197,20 @@ class MyController < ApplicationController
|
|||
Token.delete_user_all_tokens(@user)
|
||||
logout_user
|
||||
redirect_to signin_url(back_url: my_account_path)
|
||||
return
|
||||
else
|
||||
flash.now[:error] = l(:notice_account_wrong_password)
|
||||
#flash.now[:error] = l(:notice_account_wrong_password)
|
||||
end
|
||||
end
|
||||
#render :template => 'my/account',:layout=>'base_users_new'
|
||||
rescue Exception => e
|
||||
if e.message == 'wrong password'
|
||||
flash.now[:error] = l(:notice_account_wrong_password)
|
||||
# flash.now[:error] = l(:notice_account_wrong_password)
|
||||
else
|
||||
flash.now[:error] = e.message
|
||||
# flash.now[:error] = e.message
|
||||
end
|
||||
render :template => 'my/account',:layout=>'base_users_new'
|
||||
flash.now[:error] = l(:notice_account_old_wrong_password)
|
||||
end
|
||||
render :template => 'my/account',:layout=>'base_users_new'
|
||||
end
|
||||
|
||||
# Create a new feeds key
|
||||
|
|
|
@ -9,6 +9,7 @@ zh:
|
|||
locale: "zh-CN"
|
||||
|
||||
notice_account_updated: 帐号更新成功
|
||||
notice_account_old_wrong_password: 原始密码错误
|
||||
notice_account_wrong_password: 密码错误
|
||||
name_can_be_empty: 可以不填写真实姓名[保密所需]
|
||||
notice_successful_create: 创建成功
|
||||
|
|
Loading…
Reference in New Issue