diff --git a/login_server/src/cpp/JSONInterface/JsonUpdateUserInfos.cpp b/login_server/src/cpp/JSONInterface/JsonUpdateUserInfos.cpp index 6ea3ac21d..b38b2bac0 100644 --- a/login_server/src/cpp/JSONInterface/JsonUpdateUserInfos.cpp +++ b/login_server/src/cpp/JSONInterface/JsonUpdateUserInfos.cpp @@ -15,7 +15,6 @@ Poco::JSON::Object* JsonUpdateUserInfos::handle(Poco::Dynamic::Var params) { /* 'session_id' => $session_id, - 'email' => $email, 'update' => ['User.first_name' => 'first_name', 'User.last_name' => 'last_name', 'User.disabled' => 0|1, 'User.language' => 'de'] */ // incoming @@ -34,8 +33,7 @@ Poco::JSON::Object* JsonUpdateUserInfos::handle(Poco::Dynamic::Var params) /// not available for the given type. /// Throws InvalidAccessException if Var is empty. try { - paramJsonObject->get("email").convert(email); - + auto session_id_obj = paramJsonObject->get("session_id"); if (!session_id_obj.isEmpty()) { session_id_obj.convert(session_id); @@ -66,10 +64,7 @@ Poco::JSON::Object* JsonUpdateUserInfos::handle(Poco::Dynamic::Var params) } auto user = mSession->getNewUser(); auto user_model = user->getModel(); - if (user_model->getEmail() != email) { - return customStateError("not same", "email don't belong to logged in user"); - } - + Poco::JSON::Object* result = new Poco::JSON::Object; result->set("state", "success"); Poco::JSON::Array jsonErrorsArray;