mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-12 02:48:48 -04:00
Correct redirect() calls to CI4 format
This commit is contained in:
committed by
Steve Ireland
parent
dd7e2f7001
commit
0fad576550
@@ -26,19 +26,20 @@ class Login extends BaseController
|
||||
'latest_version' => $migration->is_latest(),
|
||||
'application_version' => $migration->get_current_version()
|
||||
];
|
||||
//TODO: Validation isn't working. #3595
|
||||
// if(strtolower($this->request->getMethod()) != 'post')
|
||||
// {
|
||||
echo view('login', $data);
|
||||
// }
|
||||
|
||||
if($this->request->getMethod() != 'post')
|
||||
{
|
||||
echo view('login', $data);
|
||||
}
|
||||
|
||||
//TODO: Validation isn't working. #3595
|
||||
// if(!$this->validate(['username' => 'required|login_check']))
|
||||
// {
|
||||
// echo view('login', ['validation' => $this->validator->getErrors()]);
|
||||
// }
|
||||
}
|
||||
|
||||
return redirect('home');
|
||||
// return redirect()->to('home');
|
||||
}
|
||||
|
||||
/* public function login_check(string $username): bool
|
||||
|
||||
@@ -26,7 +26,7 @@ class Secure_Controller extends BaseController
|
||||
|
||||
if(!$this->employee->is_logged_in())
|
||||
{
|
||||
redirect('login');
|
||||
redirect()->to('login');
|
||||
}
|
||||
|
||||
$logged_in_employee_info = $this->employee->get_logged_in_employee_info();
|
||||
|
||||
@@ -400,7 +400,7 @@ class Employee extends Person
|
||||
{
|
||||
$this->session->destroy();
|
||||
|
||||
redirect('login');
|
||||
redirect()->to('login');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user