Add extra obligatory fields when editing a node as anonymous user I need a way to either add extra fields or make two fields obligatory when an anonymous user is editing a node. I'll explain:
There is a node type in my site that can be freely edited, modifications are saved as new revisions. To know who edited a node i want to add a mail field and other extra fields that require other info from the anonymous user but these fields don't need to be obgligatory when the nodes are edited by registered users. 

I was thinking about using the module suggested in this discussion: How can anonymous users be allowed to post while still maintaining content integrity?
but i require that the mail entered from the user is saved inside the node and also i require an extra field other than the mail.

Is there any way to achieve that?
You could use a the hook_form_alter to get the desired function:

function mymodule_form_alter(&amp;$form, &amp;$form_state) {      
  if($form['type']['#value'] == 'DESIRED_CONTENT_TYPE') {
    if( user_is_anonymous() ){
      //Fields are required for anonymous users
      $form['field_ABC'][LANGUAGE_NONE]['0']['value']['#required'] = TRUE;
      $form['field_DEF'][LANGUAGE_NONE]['0']['value']['#required'] = TRUE;
    }
    else{
      //Hide fields for logged in users
      $form['field_ABC']['#access'] = FALSE;
      $form['field_DEF']['#access'] = FALSE;
    }
  }
}