luceos
I am trying to send a PATCH Request to change users password and it is not changing. I tried with other filds and they don't change too.
$client = new FlarumClient('https://forum.mydomain.com', ['token' => 'TOKEN_FROM_API_KEYS_TABLE; user_id=1'], ['verify' => true]);
$data = [
"data" => [
"type" => "users",
"id" => 132,
"attributes" => [
"email" => "user.email@gmail.com",
"password" => 'myPassWord'
]],
"meta.password"=> "pass123"
];
$res = $client->request('PATCH', '/api/users/132', $data);
Guzzle sends me back a response of
{"status":200,"message":"{\"data\":{\"type\":\"users\",\"id\":\"132\",\"attributes\":{\"username\":\"mobile_user\",\"displayName\":\"mobile_user\",\"avatarUrl\":null,\"slug\":\"mobile_user\",\"joinTime\":\"2022-10-09T15:12:34+00:00\",\"discussionCount\":0,\"commentCount\":0,\"canEdit\":true,\"canEditCredentials\":true,\"canEditGroups\":true,\"canDelete\":true,\"lastSeenAt\":\"2022-10-10T18:37:09+00:00\",\"isEmailConfirmed\":true,\"email\":\"user.email@gmail.com\",\"fof-upload-uploadCountCurrent\":0,\"fof-upload-uploadCountAll\":0,\"suspendReason\":null,\"suspendMessage\":null,\"suspendedUntil\":null,\"canSuspend\":true},\"relationships\":{\"groups\":{\"data\":[]}}}}"}
But the user password doesn't change.
What am I doing wrong?
Thanks in advance!