mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove email from updateUserInfos call
This commit is contained in:
parent
6c42d20edd
commit
a5d6b510f5
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user