обработка ошибки
This commit is contained in:
@ -1112,12 +1112,16 @@
|
||||
$expiration=false;
|
||||
$overdue=false;
|
||||
$sql="select * from ".$Schema."p__Login(".getSQLValue($idType,$_SESSION['USER_ID']).",'$login','$password',null,null,null);";
|
||||
/*
|
||||
$ga=new GoogleAuthenticator;
|
||||
$code=$ga->getCode($user->ga_secret);
|
||||
if ($code!=$_POST['code']) return new AuthError('invalid code');
|
||||
*/
|
||||
try
|
||||
{
|
||||
$res = $db->query($sql);
|
||||
} catch (Exception $e)
|
||||
{
|
||||
if(str_contains($e->getMessage(), ']]'))
|
||||
sendError(1, $e->getMessage());
|
||||
else
|
||||
sendError(1, '[['.trt("SQL_query_error").']]'.$e->getMessage());
|
||||
}
|
||||
if($res->rowCount()>0)
|
||||
{
|
||||
$result = $res->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
Reference in New Issue
Block a user