mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
allow only one username change
This commit is contained in:
parent
d9fc89d2c4
commit
3f50d14d22
@ -89,7 +89,10 @@ Poco::JSON::Object* JsonUpdateUserInfos::handle(Poco::Dynamic::Var params)
|
||||
std::string str_val = validateString(value, "User.username", jsonErrorsArray);
|
||||
|
||||
if (str_val.size() > 0) {
|
||||
if (user_model->getUsername() != str_val) {
|
||||
if (user_model->getUsername() != "") {
|
||||
jsonErrorsArray.add("change username currently not supported!");
|
||||
}
|
||||
else if (user_model->getUsername() != str_val) {
|
||||
if (user->isUsernameAlreadyUsed(str_val)) {
|
||||
jsonErrorsArray.add("username already used");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user