| Línea 956... |
Línea 956... |
| 956 |
$userMapper = UserMapper::getInstance($this->adapter);
|
956 |
$userMapper = UserMapper::getInstance($this->adapter);
|
| 957 |
$user = $userMapper->fetchOne($companyUser->user_id);
|
957 |
$user = $userMapper->fetchOne($companyUser->user_id);
|
| Línea 958... |
Línea 958... |
| 958 |
|
958 |
|
| 959 |
if ($user) {
|
959 |
if ($user) {
|
| - |
|
960 |
// Copiar la imagen del perfil para la imagen principal
|
| 960 |
// Copiar la imagen del perfil para la imagen principal
|
961 |
$user_source = $storage->getTmpFilename();
|
| 961 |
$user_filename = 'user-' . uniqid() . '.png';
|
962 |
$user_filename = 'user-' . uniqid() . '.png';
|
| Línea 962... |
Línea 963... |
| 962 |
$target_filename_user = $storage->composePathToFilename(Storage::TYPE_USER, $user->uuid, $user_filename);
|
963 |
$target_filename_user = $storage->composePathToFilename(Storage::TYPE_USER, $user->uuid, $user_filename);
|
| 963 |
|
964 |
|
| 964 |
// Copiar la imagen del perfil para la imagen principal
|
965 |
// Copiar la imagen del perfil para la imagen principal
|
| 965 |
if (!$storage->uploadImageResize($source, $target_filename_user, $target_width, $target_height)) {
|
966 |
if (!$storage->uploadImageResize($user_source, $target_filename_user, $target_width, $target_height)) {
|
| Línea 966... |
Línea 967... |
| 966 |
return $this->_createSimpleErrorResponse('ERROR_THERE_WAS_AN_ERROR');
|
967 |
return $this->_createSimpleErrorResponse('ERROR_THERE_WAS_AN_ERROR');
|
| 967 |
}
|
968 |
}
|