0
0
Fork 0

compare usernames case-insensitively on new proof creation flow (#10544)

* compare usernames case-insensitively on new proof creation flow

* Fix code style issue
This commit is contained in:
Alex Gessner 2019-04-10 12:05:11 -04:00 committed by Eugen Rochko
parent 9e2a1f1838
commit 154106c0c3
2 changed files with 14 additions and 5 deletions

View file

@ -18,7 +18,7 @@ class Settings::IdentityProofsController < Settings::BaseController
provider_username: params[:provider_username]
)
if current_account.username == params[:username]
if current_account.username.casecmp(params[:username]).zero?
render layout: 'auth'
else
flash[:alert] = I18n.t('identity_proofs.errors.wrong_user', proving: params[:username], current: current_account.username)