Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'func/core.php';
- if(User::isAuthorized())
- Utils::redirect("/index.php");
- if(Utils::hasArgument("do")) {
- Utils::validateArguments(array("login", "password"));
- $login = Utils::getArgument("login");
- $password = Utils::getArgument("password");
- if(Utils::maskedSearch($login, "=;',/\\="))
- Utils::redirect("/login.php?message=Обнаружены запрещенные символы");
- if(strlen($login) < 4 || strlen($password) < 4)
- Utils::redirect("/login.php?message=Логин или пароль слишком короткий");
- if(strlen($login) > 16 || strlen($password) > 16)
- Utils::redirect("/login.php?message=Логин или пароль слишком длинные");
- User::register($login, $password, array());
- User::login($login, $password);
- Utils::redirect("/index.php");
- }
- Page::render("register.php", "Регистрация", array("message" => Utils::getArgument("message")));
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement