diff options
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index d722caa..3283bcc 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -47,7 +47,7 @@ class Account user_invite_code.save end end - rescue StandardError => ex + rescue VALIDATION_FAILED => ex user.errors.add(:base, ex.to_s) if user ensure if creation_problem?(user, identity) @@ -62,6 +62,9 @@ class Account update_login(attrs[:login]) @user.update_attributes attrs.slice(:password_verifier, :password_salt) end + if attrs[:recovery_code_verifier].present? + @user.update_attributes attrs.slice(:recovery_code_verifier, :recovery_code_salt) + end # TODO: move into identity controller key = update_pgp_key(attrs[:public_key]) @user.errors.set :public_key, key.errors.full_messages |