]> git.wh0rd.org - tt-rss.git/commitdiff
initialize user theme in SINGLE_USER_MODE (closes #72)
authorAndrew Dolgov <fox@madoka.spb.ru>
Fri, 16 Jun 2006 12:23:26 +0000 (13:23 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Fri, 16 Jun 2006 12:23:26 +0000 (13:23 +0100)
functions.php

index ab548c2f6a2c6adc2683963069f225e7ec485efd..4c05e7cb8b50f337998253d12b47e71da1148e44 100644 (file)
                        $_SESSION["uid"] = 1;
                        $_SESSION["name"] = "admin";
 
+                       $user_theme = get_user_theme_path($link);
+       
+                       $_SESSION["theme"] = $user_theme;
+                       $_SESSION["ip_address"] = $_SERVER["REMOTE_ADDR"];
+       
+                       initialize_user_prefs($link, $_SESSION["uid"]);
+       
                        return true;
                }
        }
                                }                               
                        }
                } else {
-                       $_SESSION["uid"] = 1;
-                       $_SESSION["name"] = "admin";
-                       initialize_user_prefs($link, 1); 
+                       return authenticate_user($link, "admin", null);
                }
        }