diff --git a/plugins/login-predefined.php b/plugins/login-predefined.php new file mode 100644 index 000000000..ffb538a9f --- /dev/null +++ b/plugins/login-predefined.php @@ -0,0 +1,19 @@ + +* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0 +*/ +class PredefinedLogin { + + function credentials() { + return array(SERVER, $_ENV["ADMINER_PREDEFINED_PASSWORD"], $_ENV["ADMINER_PREDEFINED_PASSWORD"]); + } + + function loginFormField($name, $heading, $value) { + if ($name == 'username' || $name == 'password') $value = 'Predefined '; + return $heading . $value; + } + +}