Jump to content

Action Hook Help for a noob please


Dgital Essence

Recommended Posts

Hi,

ultimately I want to park a domain to my parking page when a customer registers a domain but to start with I just want to get the hang of action hooks.

 

I have copied the following

 

<?php

function send_email_to_heds($vars) {
$adminID = $vars["adminID"];
$username = $vars["adminID"];

$to = 'to_email@example.com';
$subject = 'Admin has logged into the system';
$message = 'Admin ID = '.$adminID.' Username = '.$username;
$headers = 'From: from_email@example.com' . "\r\n" .
'Reply-To: from_email@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}


add_hook("AdminLogin",1,"send_email_to_heds");


?>

 

and while it sends emails, it isn't picking up the vars at all.

 

Where have I gone wrong please? as far as I know the Hook AdminLogin takes the var: adminID

 

thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated