1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 19:44:00 +02:00

Allow permanent login without customization

This commit is contained in:
Jakub Vrana
2010-05-06 15:45:34 +02:00
parent 605b09301b
commit 4ba2d85623
5 changed files with 38 additions and 10 deletions

View File

@@ -7,14 +7,14 @@ class Adminer {
return lang('Editor');
}
//! driver
//! driver, ns
function credentials() {
return array(); // default INI settings
}
function permanentLogin() {
return "";
return password_file();
}
function database() {
@@ -37,9 +37,7 @@ document.getElementById('username').focus();
</script>
<?php
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
if ($this->permanentLogin()) {
echo checkbox("permanent", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
}
echo checkbox("permanent", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
}
function login($login, $password) {