Last active
January 27, 2022 15:39
-
-
Save iarp/6367158 to your computer and use it in GitHub Desktop.
A way to allow direct login to adminer
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 | |
function adminer_object() { | |
class AdminerSoftware extends Adminer { | |
function credentials() { | |
# You don't need this if statement, but I added it because not having | |
# it skipped the login screen for everyone. | |
if ($_GET['username'] == 'username') | |
return array('127.0.0.1', 'username', 'password'); | |
} | |
} | |
return new AdminerSoftware; | |
} | |
require_once("adminer.php"); |
I had the same issue, saw this, and didn't realise it was the solution.
The issue is, the login page is displayed on the first load. When you click login (without filling in any information) you become logged in.
Thanks @madurapa for a quick solution.
Check out my fork work for an updated and working version
This stopped working on version 4.7.7
:(
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!
If you add
$_GET['username'] = '';
to the top of this code does the tric