updated css/js libraries
[e-DoKo.git] / include / user.php
index eb4f6c4c33dd8160c066491811546b3328bb75ae..764c694fbe60567e719b54421467e82bf3dc6319 100644 (file)
@@ -1,5 +1,5 @@
 <?php
 <?php
-/* Copyright 2006, 2007, 2008, 2009, 2010 Arun Persaud <arun@nubati.net>
+/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Arun Persaud <arun@nubati.net>
  *
  *   This file is part of e-DoKo.
  *
  *
  *   This file is part of e-DoKo.
  *
@@ -25,20 +25,21 @@ if(!isset($HOST))
   exit;
 
 /* test id and password, should really be done in one step */
   exit;
 
 /* test id and password, should really be done in one step */
-if(!isset($_SESSION["name"]))
+if(isset($_SESSION['id']))
   {
   {
-    $email     = $_REQUEST["email"];
-    $password  = $_REQUEST["password"];
-  }
-else
-  {
-    $name = $_SESSION["name"];
-    $email     = DB_get_email('name',$name);
-    $password  = DB_get_passwd_by_name($name);
+    $myid = $_SESSION['id'];
+    $r = DB_query_array("SELECT email,password FROM User WHERE id=".DB_quote_smart($myid)."");
+    if($r)
+      {
+       $email     = $r[0];
+       $password  = $r[1];
+      };
   };
 
   };
 
+global  $ADMIN_NAME;
+
 /* user has forgotten his password */
 /* user has forg