]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - login/index.php
Setup major reshuffle: split up in pre-auth: backend & user creation, and
[irc/unrealircd/unrealircd-webpanel.git] / login / index.php
index 1d73e7725e4c996022c38f1eefecfd8c8cc20f2a..97cc98ad5f271e51096c3663fd95a68d0da68f14 100644 (file)
@@ -38,9 +38,13 @@ if (!empty($_POST))
                if (isset($user->id) && $user->password_verify($_POST['password']))
                {
                        $_SESSION['id'] = $user->id;
-                       header('Location: ' . $redirect);
                        $user->add_meta("last_login", date("Y-m-d H:i:s"));
                        Hook::run(HOOKTYPE_USER_LOGIN, $user);
+                       
+                       /* Middle of install? Override redirect: */
+                       if (!isset($config['unrealircd']) || empty($config['unrealircd']['host']))
+                               $redirect = get_config("base_url")."settings/install2.php";
+                       header('Location: ' . $redirect);
                        die();
                }
                else