From a5d6b510f56393e4eb7a0d7422184b938313cf04 Mon Sep 17 00:00:00 2001 From: Einhornimmond Date: Fri, 1 Oct 2021 19:03:05 +0200 Subject: [PATCH] remove email from updateUserInfos call --- .../src/cpp/JSONInterface/JsonUpdateUserInfos.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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;