How to use entity_metadata_wrapper for users particulary in hook_user_presave For node I can use the entity_metadata_wrapper like below

function mymodule_node_presave($node) {
  $ewrapper = entity_metadata_wrapper('node', $node);
  $ewrapper-&gt;title-&gt;set('new title');
}


However how can I use the entity_metadata_wrapper for users. I want to use entity_metadata_wrapper in hook_user_presave.

function mymodule_user_presave(&amp;$edit, $account, $category) {
  ???
}


this variant works for me:

function mymodule_user_presave(&amp;$edit, $account, $category) {
  $edit_object = (object) $edit;
  $ewrapper = entity_metadata_wrapper('user', $edit_object);
  $field_telefon = $ewrapper-&gt;field_telefon-&gt;value();
  $ewrapper-&gt;field_telefon-&gt;set($field_telefon.'123');
  $edit = (array)$edit_object;
}
Try casting $edit as an object:

function mymodule_user_presave(&amp;$edit, $account, $category) {
  $ewrapper = entity_metadata_wrapper('user', (object) $edit);
}