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