diff --git a/resources/user_resource.inc b/resources/user_resource.inc index 43b6d76..d09398c 100644 --- a/resources/user_resource.inc +++ b/resources/user_resource.inc @@ -383,6 +383,13 @@ function _user_resource_update($uid, $account) { foreach ($account as $key => $value) { if ($key != 'pass' && $key != 'roles') { $form_state['values'][$key] = $value; + // Force assignment of new file IDs if they are coming in request. + // This is a terribly hacky way of fixing the issue, however it hasn't + // been fixed in a normal way since 2011! + // See https://www.drupal.org/node/1433254 + if (property_exists($account_loaded, $key) && is_array($value) && isset($value['und'][0]['fid'])) { + $account_loaded->{$key} = $value; + } } }