Пример #1
0
 function AuthenticateAction()
 {
     $username = addslashes($_REQUEST['username']);
     $password = sha1($_REQUEST['password']);
     $isRememberme = $_REQUEST['rememberme'];
     $user_result = userModel::userAuthentication($username, $password, $login);
     if ($user_result == true && $isRememberme == "true") {
         $credentials = $username . ',' . $password;
         setcookie("TareControl", $credentials, time() + 3600);
     }
     echo json_encode(array("status" => $user_result));
 }