From 742e4326579548bd710ecf46840014d0a440a498 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 6 Jan 2019 22:15:31 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D1=80=D0=B8=D0=BF=D1=82=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=D0=B2=D1=8F=D0=B7=D0=BA=D0=B8=20=D0=BA=20ASFramewo?= =?UTF-8?q?rk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compat/auth/asframework.php | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 compat/auth/asframework.php diff --git a/compat/auth/asframework.php b/compat/auth/asframework.php new file mode 100644 index 00000000..829189fd --- /dev/null +++ b/compat/auth/asframework.php @@ -0,0 +1,56 @@ +auth($args['login'],$args['pass']); + echo 'OK:'.$acc->login.''; + app::stop(); + } catch (AccountException $e) { + $msg = $e->getMessage(); + if ($msg == AccountException::AuthError) { + echo 'Login or password is incorrect'; + app::stop(); + } + if ($msg == AccountException::NoLoginError) { + echo 'This account is not allowed to sign in'; + app::stop(); + } + if ($msg == AccountException::FatalBanError) { + echo 'You are permanently banned'; + app::stop(); + } + } + } +}