register('Furentes', 'furentes@furentes.de', '123456789')); // print_r($auth->login('Furentes', '123456789')); // echo $auth->isLoggedIn(); // echo $auth->logout(); if ($auth->isLoggedIn()) { header('Location: /'); } $errors = []; $success = false; if (isset($_POST['register'])) { if ($_POST['password'] !== $_POST['password2']) { array_push($errors, 'Passwörter sind nicht gleich'); } else { $register = $auth->register($_POST['username'], $_POST['email'], $_POST['password']); if (is_array($register)) { $errors = $register; } else { $success = true; } } } ?>