This is at the top of my login page:
require dirname(__FILE__) . '/../ASEngine/AS.php';
if (app('login')->isLoggedIn()) {
redirect('../index.php');
}
if (isset($_POST['testlogin'])) {
app('login')->userLogin($_POST['username'], $_POST['password']);
}
And my form looks like this:
<form method="POST">
<input type="text" name="username">
<input type="password" name="password">
<button type="submit" name="testlogin">Login</button>
</form>
Is this the correct way to do it? If so why do I keep getting "{"status":"error","errors":{"username":"","password":"Wrong username\/password combination."}}". I am 100% sure the details are correct because I'm using the default admin login. "admin, admin123".