diff options
author | Daniel GarcĂa <[email protected]> | 2021-10-19 20:14:29 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-19 20:14:29 +0200 |
commit | f94ac6ca61e24952e3906018ee54615cf9c123ec (patch) | |
tree | fb1031de6f9b5619161c5123023adb554fb30543 /src/api/core/accounts.rs | |
parent | 016fe2269e3079be65f86c4887b959341c984bfa (diff) | |
parent | cee3fd5ba284f376cd05755dbc9cd6b7ded297ed (diff) | |
download | vaultwarden-1.23.0.tar.gz vaultwarden-1.23.0.zip |
Merge pull request #2044 from jjlin/emergency-access-cleanup1.23.0
Emergency Access cleanup
Diffstat (limited to 'src/api/core/accounts.rs')
-rw-r--r-- | src/api/core/accounts.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index 4e613a37..93636889 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -91,10 +91,9 @@ fn register(data: JsonUpcase<RegisterData>, conn: DbConn) -> EmptyResult { user } else if CONFIG.is_signup_allowed(&email) { // check if it's invited by emergency contact - if EmergencyAccess::find_invited_by_grantee_email(&data.Email, &conn).is_some() { - user - } else { - err!("Account with this email already exists") + match EmergencyAccess::find_invited_by_grantee_email(&data.Email, &conn) { + Some(_) => user, + _ => err!("Account with this email already exists"), } } else { err!("Registration not allowed or user already exists") |