Remove login/register pages, use Login/Register controllers completely

This commit is contained in:
DariusIII
2018-03-29 10:22:36 +02:00
parent 5d61c66997
commit 005cfdaa8d
40 changed files with 177 additions and 213 deletions
@@ -2,6 +2,7 @@
namespace App\Http\Controllers\Auth;
use App\Models\Settings;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
@@ -65,10 +66,35 @@ class LoginController extends Controller
return redirect()->intended($this->redirectPath());
}
app('smarty.view')->assign('error', 'These credentials do not match our records.');
return redirect()->back()
->withInput()
->withErrors([
'login' => 'These credentials do not match our records.',
]);
}
/**
* @throws \Exception
*/
public function showLoginForm()
{
$theme = Settings::settingValue('site.main.style');
app('smarty.view')->assign(['error' => '', 'username' => '', 'rememberme' => '']);
$meta_title = 'Login';
$meta_keywords = 'Login';
$meta_description = 'Login';
$content = app('smarty.view')->fetch($theme.'/login.tpl');
app('smarty.view')->assign(
[
'error' => 'These credentials do not match our records.',
'content' => $content,
'meta_title' => $meta_title,
'meta_keywords' => $meta_keywords,
'meta_description' => $meta_description,
]
);
app('smarty.view')->display($theme.'/basepage.tpl');
}
}