diff options
author | Andrew Dolgov <[email protected]> | 2008-08-01 04:47:16 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-08-01 04:47:16 +0100 |
commit | 73f5f114ec76d32db19f3dcc2aa571c912ed360b (patch) | |
tree | fd382dfdfa29c9a38973cf68e401b3102d76afa2 | |
parent | 8dccabedaee3450642c58c75101ff52c38508112 (diff) |
merge tweaks to ALLOW_REMOTE_USER_AUTH functionality from Erick Rudiak
-rw-r--r-- | functions.php | 4 | ||||
-rw-r--r-- | login_form.php | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/functions.php b/functions.php index e00faf6b6..f1836edd8 100644 --- a/functions.php +++ b/functions.php @@ -1682,11 +1682,11 @@ $pwd_hash2 = encrypt_password($password, $login); if (defined('ALLOW_REMOTE_USER_AUTH') && ALLOW_REMOTE_USER_AUTH - && $_SERVER["REMOTE_USER"]) { + && $_SERVER["REMOTE_USER"] && $login != "admin") { $login = db_escape_string($_SERVER["REMOTE_USER"]); - $query = "SELECT id,login,access_level + $query = "SELECT id,login,access_level,pwd_hash FROM ttrss_users WHERE login = '$login'"; diff --git a/login_form.php b/login_form.php index b2c6bcf59..cf764bfe8 100644 --- a/login_form.php +++ b/login_form.php @@ -101,9 +101,11 @@ window.onload = init; <?php } ?> <table> <tr><td align="right"><?php echo __("Login:") ?></td> - <td align="right"><input name="login"></td></tr> + <td align="right"><input name="login" + value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr> <tr><td align="right"><?php echo __("Password:") ?></td> - <td align="right"><input type="password" name="password"></td></tr> + <td align="right"><input type="password" name="password" + value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr> <?php if (ENABLE_TRANSLATIONS) { ?> <tr><td align="right"><?php echo __("Language:") ?></td> <td align="right"> |