Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Http\Controllers\Auth;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;

Expand All @@ -27,6 +28,11 @@ class LoginController extends Controller
*/
protected $redirectTo = '/home';

protected function credentials(Request $request)
{
return [$this->username() => $request->input($this->username()), 'password' => $request->input('password'), 'active' => 1];
}

/**
* Create a new controller instance.
*
Expand Down
5 changes: 3 additions & 2 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public function __construct()
*/
public function index()
{
if(!Session::has('pwd')){
Session::put('pwd','~');
if (!Session::has('pwd')) {
Session::put('pwd', '~');
Session::put('level', 0);
}
$user = user::find(Auth::id());
$level = level::find($user['level_id']);
Expand Down
Loading