Created
August 20, 2014 22:24
-
-
Save Mark-H/c66bf4afaa820b2db326 to your computer and use it in GitHub Desktop.
Auto Login Plugin for MODX Demo Sites. Add to OnManagerLoginFormRender event.
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 | |
if ($modx->getOption('http_host') == 'YOUR_DOMAIN_HERE') { | |
$op = '<script type="text/javascript"> | |
Ext.onReady(function() { | |
document.getElementById("modx-login-username").value = "USER"; | |
document.getElementById("modx-login-password").value = "PASS"; | |
document.getElementById("modx-login-btn").click(); | |
}); | |
</script>'; | |
$modx->event->output($op); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment