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(); + } + } + } +}