Jump to content

How to get client email on login ?


Recommended Posts


I'm trying to do one module to send one email to client when anyone wrong password account (like admin)

But I'm having problem to get the email on input username, all data $_POST will be send to dologin.php


My hook:




function hook_loginfail($vars) {


if($_SERVER["REQUEST_URI"] = "incorrect=true"){


// echo $whmcs->get_req_var('username');


$command = "sendemail";

$adminuser = "Rhuan";

$values["customtype"] = "general";

$values["customsubject"] = "Login Failed";

$values["custommessage"] = "Olá clientname...";

$values["id"] = 1; // With one selection on database using WHERE emailofclient to get ID, Firstname...

$results = localAPI($command,$values,$adminuser);


if ($results['result']!="success") echo "An Error Occurred: ".$results['result'];









I need the email of client to check on database if exist and get the id to send email address...

Thank you very much!

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.

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