Correct redirect() calls to CI4 format

This commit is contained in:
objecttothis
2023-01-30 13:15:43 +04:00
committed by Steve Ireland
parent dd7e2f7001
commit 0fad576550
3 changed files with 9 additions and 8 deletions

View File

@@ -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

View File

@@ -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();

View File

@@ -400,7 +400,7 @@ class Employee extends Person
{
$this->session->destroy();
redirect('login');
redirect()->to('login');
}
/**