Automatically login to phorkie
[phorkie.git] / www / www-header.php
index 74329ed6d0da1191fa61969fd29cd36ed974bc44..833fb8a56479a461382dba5983cfe6cfc9495551 100644 (file)
@@ -105,6 +105,10 @@ function render($tplname, $vars = array())
         $vars['identity'] = $_SESSION['identity'];
         $vars['name'] = $_SESSION['name'];
         $vars['email'] = $_SESSION['email'];
+    } else if (isset($_COOKIE['lastopenid'])
+        && !isset($_COOKIE['tried-autologin'])
+    ) {
+        $vars['autologin'] = true;
     }
     $vars['db'] = new Database();
     if (!isset($vars['htmlhelper'])) {