Created
October 1, 2018 15:55
-
-
Save aiiddqd/42320e2356c8d78e98252aa0a86ec704 to your computer and use it in GitHub Desktop.
Adminer > 3.6.3 auto login for my Vagrant config
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 | |
if(empty($_GET['username']) ){ | |
$_GET['username'] = 'vagrant'; | |
} | |
function adminer_object() { | |
class AdminerSoftware extends Adminer { | |
function credentials() { | |
return array('localhost', 'vagrant', 'password'); | |
} | |
function database() { | |
// database name, will be escaped by Adminer | |
return 'vagrant'; | |
} | |
function login($login, $pass){ | |
return true; | |
} | |
} | |
return new AdminerSoftware; | |
} | |
require_once './adminer.php'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment