Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A way to allow direct login to adminer
<?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");
@madurapa

This comment has been minimized.

Copy link

@madurapa madurapa commented Dec 13, 2017

Thanks!

If you add $_GET['username'] = ''; to the top of this code it does the tric

@cornernote

This comment has been minimized.

Copy link

@cornernote cornernote commented Aug 11, 2018

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.

@realies

This comment has been minimized.

Copy link

@realies realies commented Dec 3, 2018

Check out my fork work for an updated and working version

@cornernote

This comment has been minimized.

Copy link

@cornernote cornernote commented Sep 23, 2020

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
You can’t perform that action at this time.