Commit a6063776 authored by syaifurplus's avatar syaifurplus

fix middleware login error

parent f522f4f0
......@@ -19,6 +19,11 @@ class Login
foreach ($roles as $role) {
$users = UserModel::where('id', session()->get('users_id'))->first();
if (!$users) {
return redirect()->route('login')->with('error', 'User not found. Please log in again.');
}
if ((Hash::check('bkpeduli', $users->password)) || (Hash::check('bk-peduli', $users->password))) {
return redirect()->route('password.change')->with('gagal', 'Silakan ganti password Anda terlebih dahulu.');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment