$this->user = EmailUserAuthentication::getInstance()->loginManually($this->username, $this->password);
}
catch (UserInputException $e2) {
- if ($e->getField() == 'username') throw $e;
+ if ($e2->getField() == 'username') throw $e;
throw $e2;
}
}
-
- throw $e;
+ else {
+ throw $e;
+ }
}
else {
throw $e;
if ($sendStatusCode) @header('HTTP/1.1 307 Temporary Redirect');
header('Location: '.$location);
}
+
+ /**
+ * Does a delayed redirect.
+ *
+ * @param string $location
+ * @param string $message
+ * @param integer $delay
+ */
+ public static function delayedRedirect($location, $message, $delay = 5) {
+ WCF::getTPL()->assign(array(
+ 'url' => $location,
+ 'message' => $message,
+ 'wait' => $delay,
+ 'templateName' => 'redirect'
+ ));
+ WCF::getTPL()->display('redirect');
+ }
}