<?php
api::authClient(function($data){
    $chechtt=0;
    if($data["login"]!=null && $data["password"]!=null)
    {
        $row = db::row("select count(*) as nbr,website from ¤CLIENT where login='".$data["login"]."' and password='".$data["password"]."' ");
        
        if($row["nbr"]!=0)
            $chechtt=1;
        else 
            $chechtt=0;
    }

    return [
        "user" => [
                "webu" => $row["website"],
                "login" => $data["login"],
                "password" => $data["password"],
                "etat" => $chechtt,
        ],
        "active" => $chechtt
    ];
});

?>