Rhuan Posted September 25, 2013 Share Posted September 25, 2013 Hi... 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: <?php 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']; } } add_hook("ClientAreaHeaderOutput",1,"hook_loginfail"); ?> I need the email of client to check on database if exist and get the id to send email address... Thank you very much! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.