Get the before and after values of a node field I need to compare the before save/update value with the after save/update value of a node field.

Example: There is an already existing node with the title of "Hello". I then edit the node and change the title to "World". 

I need to get the before value of "Hello".

function mymodule_node_presave($node){

    $before = $node-&gt;title; 
    drupal_set_message($before, 'error');  

}


function mymodule_node_update($node){

    $after = $node-&gt;title; 
    drupal_set_message($after, 'warning');  

}


But I always keep getting the same value...



Did I just discover a drupal bug? or what? Because I've used this method in the past with user hooks and it works as expected:

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

     $before = $account-&gt;field_custom['und'][0]['value'];
     drupal_set_message($before, 'error'); 

}

function mymodule_user_update(&amp;$edit, $account, $category) {

     $after = $account-&gt;field_custom['und'][0]['value'];
     drupal_set_message($after, 'warning');  

}
For new created nodes in hook_node_update you will never get any old values for any $node fields. Use node_load($node-&gt;nid) to load the previous instance of the $node and do any comparisons with it. You can also use $node-&gt;original to view the commited values to the database.