Skip to content

Instantly share code, notes, and snippets.

@realies
Forked from iarp/adminer autologin
Last active April 13, 2020 21:40
Show Gist options
  • Save realies/5631eb0ea14df7b84d55b9f2376a8cc8 to your computer and use it in GitHub Desktop.
Save realies/5631eb0ea14df7b84d55b9f2376a8cc8 to your computer and use it in GitHub Desktop.
A way to allow direct login to adminer
<?php
$_GET["username"] = "";
$_GET["db"] = "database";
function adminer_object() {
class AdminerAutoLogin extends Adminer {
function credentials() {
return array("127.0.0.1", "username", "password");
}
function login($login, $password) {
return true;
}
}
return new AdminerAutoLogin;
}
require_once("adminer.php");
@Dreller
Copy link

Dreller commented Apr 5, 2020

Thank you very much! It does the trick perfectly for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment