diff --git a/adminer/plugin.php b/adminer/plugin.php index 1186815b..679384ca 100644 --- a/adminer/plugin.php +++ b/adminer/plugin.php @@ -7,7 +7,13 @@ function adminer_object() { foreach (glob("../plugins/*.php") as $filename) { include_once $filename; } - + + /* It is possible to combine customization and plugins: + class AdminerCustomization extends AdminerPlugin { + } + return new AdminerCustomization($plugins); + */ + return new AdminerPlugin(array( // specify enabled plugins here new AdminerDumpXml, diff --git a/plugins/email-html.php b/plugins/email-html.php deleted file mode 100644 index e69de29b..00000000 diff --git a/plugins/login-table.php b/plugins/login-table.php new file mode 100644 index 00000000..828720e7 --- /dev/null +++ b/plugins/login-table.php @@ -0,0 +1,29 @@ +database = $database; + } + + function login($login, $password) { + $connection = connection(); + return (bool) $connection->result($q = "SELECT COUNT(*) FROM " . idf_escape($this->database) . ".login WHERE login = " . $connection->quote($login) . " AND password_sha1 = " . $connection->quote(sha1($password))); + } + +}