I'd like the administrator to receive an email each time a new users signs up. The email will contain all of the users profile information. Any suggestions on how I would go about doing this?

Thanks!

Dustin

Comments

nevets’s picture

You could write a module using the user hook and the op of 'insert'. The following sample should help get you going though it only displays the edit information where you want to mail it. Note this would go in a file called newuser.module in a directory called newuser under the module directory. The name of the module could be change but MUST run before the profile module (otherwise the data is cleared by the profile module)

<?php

function newuser_user($op, &$edit, &$account, $category = NULL)
{
	if ( $op == 'insert' ) {
                // Instead of printing a message you would want to contstruct and send your email here
		drupal_set_message('edit: <code>' . print_r($edit, TRUE) . '

');
}
}