-
-
Save yashodhank/09dd227bae1b62975fa08b9bb292a9c1 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> | |
'; | |
}); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment