Last active
November 27, 2021 13:03
-
-
Save jclarke/92cb1e0d6f312872690f3c2b4be86bf7 to your computer and use it in GitHub Desktop.
Disables the confirm password feature in the WHMCS admin area. Place in includes/hooks
This file contains hidden or 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
<?php | |
add_hook('AdminLogin', 1, function($vars) { | |
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp; | |
}); | |
add_hook('AdminAreaHeadOutput', 1, function($vars) { | |
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp; | |
return ' | |
<script type="text/javascript"> | |
$(document).ready(function(){ | |
if ($("input[name=\'authconfirm\']").val() == 1) { | |
location.reload(); | |
} | |
}); | |
</script> | |
'; | |
}); | |
?> |
HI
I tried it on WHMCS 7.7.1, but it doesn't seem to work, the only thing that keeps happening is that the page keeps refreshing....
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
Just to report this hook does not work anymore, at least in WHMCS 8. Thanks.
UPDATE:
My bad, it works perfectly ok, I just remove the JS part.