<?php

   include "../../pdo_connection.php";

   $sts  = array("status" => "OK");
   $stmt = $pdo->prepare('SELECT mail, name, remember, hash, autoload FROM users WHERE mail = ?');
   $stmt->execute(array($_REQUEST["mail"]));
   $user = $stmt->fetch();
   if($user["hash"] != $defp) $user["hash"] = "";

   if($user) echo json_encode(array_merge($sts, $user));
   else {
      $sts["status"] = "ERROR";
      echo json_encode($sts);
   }

?>