-
-
Save mhrubel/b82c56f37efd02d21cf8686eefeb71ff 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 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