Fix photograph issue - refs BT#9462

1.10.x
Imanol Losada 10 years ago
parent ede15f6b4f
commit cf54117f2a
  1. 6
      main/webservices/registration.soap.php

@ -1618,8 +1618,10 @@ function WSEditUserWithPicture($params) {
$filename = basename($picture_url);
$tempdir = sys_get_temp_dir();
$tempDir = api_get_path(SYS_ARCHIVE_PATH);
file_put_contents($tempDir.$filename, file_get_contents($picture_url));
$picture_uri = UserManager::update_user_picture($user_id, $filename, $tempDir.$filename);
if (strpos(get_headers($picture_url)[0], "OK")) {
file_put_contents($tempDir . $filename, file_get_contents($picture_url));
$picture_uri = UserManager::update_user_picture($user_id, $filename, $tempDir . $filename);
}
if ($user_id == 0) {
return 0;

Loading…
Cancel
Save