]> git.wh0rd.org Git - tt-rss.git/commitdiff
merge tweaks to ALLOW_REMOTE_USER_AUTH functionality from Erick Rudiak
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 1 Aug 2008 03:47:16 +0000 (04:47 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 1 Aug 2008 03:47:16 +0000 (04:47 +0100)
functions.php
login_form.php

index e00faf6b6a3f30974b47b77c74e4ef2882a53a63..f1836edd890c58cb66e152df4339023fe90322e1 100644 (file)
                        $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'";
 
index b2c6bcf593ba1b94c6e2bdfe20154490d43fd0d5..cf764bfe815a497c9ff4a5b0023d483a7c15c463 100644 (file)
@@ -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">