Created
December 22, 2015 10:59
-
-
Save arpitr/e1f47e54ea52434b5e87 to your computer and use it in GitHub Desktop.
drupal_hook_sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_node_insert | |
*/ | |
function mymodulename_node_insert($node) { | |
// Get Node Author. | |
$author = $node->author; | |
// Use Drupal Mail | |
send_mail($to=$author); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment