1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-24 07:02:51 +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

@@ -21,7 +21,7 @@ class Adminer {
* @return string cryptic string which gets combined with password
*/
function permanentLogin() {
return "";
return password_file();
}
/** Identifier of selected database
@@ -49,9 +49,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";
}
/** Authorize the user