解决用户注册无地区、身份可注册成功

This commit is contained in:
linhk 2014-08-07 15:58:00 +08:00
parent 78343effaf
commit 387d482059
1 changed files with 9 additions and 0 deletions

View File

@ -140,6 +140,15 @@ class AccountController < ApplicationController
@user.password, @user.password_confirmation = user_params[:password], user_params[:password_confirmation]
end
if(@cache_identityy == "")
flash.now[:error]= l(:label_identity)+l(:'activerecord.errors.messages.empty')
return
end
if(@cache_city == "")
flash.now[:error]= l(:label_location)+l(:'activerecord.errors.messages.empty')
return
end
case Setting.self_registration
when '1'
register_by_email_activation(@user)