diff options
author | azul <azul@riseup.net> | 2017-03-14 15:17:26 +0000 |
---|---|---|
committer | azul <azul@riseup.net> | 2017-03-14 15:17:26 +0000 |
commit | 1a69dc86077e5bbde4b6a8f181e5711384c1f253 (patch) | |
tree | 618476e33e96fe4528b8e870f51d079ae0e43e76 /app/models/account.rb | |
parent | 67824594246aee807ebacdf61c4e2d0a136eab73 (diff) | |
parent | 19714d01e28ca9ba37564fe0ad48d81c665806dd (diff) |
Merge branch 'recovery-code' into 'master'
Update recovery code
See merge request !16
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index d722caa..0731cac 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -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 |