add user.language as option

This commit is contained in:
einhornimmond 2021-04-21 18:32:46 +02:00
parent 7c27b8eaa6
commit c42d681567
2 changed files with 5 additions and 0 deletions

View File

@ -235,6 +235,7 @@ with:
"user.last_name",
"user.disabled",
"user.email_checked",
"user.language"
]
}
```
@ -269,6 +270,7 @@ Return only the fields which are defined in request
- `user.disabled`: User will be disabled if he wants a account delete but has transactions. Until transactions are saved in real blockchain, we need this data because the public key
is in db only saved in state_users so if we delete this entry, validating all transactions is no longer possible. Disabled User cannot login and cannot receive transactions.
- `email_checked`: If user has clicked on link in verification email (register), can only transfer gradidos if email_checked is 1
- `language`: Language Key for User, currently 'de' or 'en'
- `errors`: array of strings if error occure
## Login by Email Verification Code

View File

@ -131,6 +131,9 @@ Poco::JSON::Object* JsonGetUserInfos::handle(Poco::Dynamic::Var params)
auto email = user_model->getEmail();
jsonUser.set("identHash", DRMakeStringHash(email.data(), email.size()));
}
else if (parameterString == "user.language") {
jsonUser.set("language", user_model->getLanguageKey());
}
}
catch (Poco::Exception& ex) {
jsonErrorsArray.add("ask parameter invalid");