You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Direction
We use github issues to track bugs, not for support.
If you have a support question, or a feature request, raise these as threads on our forum.
Describe the bug
A clear and concise description of what the bug is.
CodeIgniter 4 version
Which version (and branch, if applicable) the bug is in.
Affected module(s)
Which package or class is the bug in, if known.
Expected behavior, and steps to reproduce if appropriate
A clear and concise description of what you expected to happen,
and how you got there.
Feel free to include a text/log extract, but use a pastebin facility for any
screenshots you deem necessary.
Context
OS: [e.g. Windows 99]
Web server [e.g. Apache 1.2.3]
PHP version [e.g. 6.5.4]
The text was updated successfully, but these errors were encountered:
khushmohammad
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Oct 6, 2020
public function checksession(){
$userId = session()->has('name');
if (!$userId) { return redirect()->to(base_url()); }
}
public function index()
{
$this->checksession();
echo view('Header');
echo view('Dashboard/Home');
echo view('Dashboard/footer');
}
khushmohammad
changed the title
page not redirecting. when i redirecting by call function
page not redirecting. when i redirecting by calling function
Oct 6, 2020
You're not returning the RedirectResponse to the calling method, but not returning it out of the index() method itself. Read up on controller filters for a better solution.
Direction
We use github issues to track bugs, not for support.
If you have a support question, or a feature request, raise these as threads on our
forum.
Describe the bug
A clear and concise description of what the bug is.
CodeIgniter 4 version
Which version (and branch, if applicable) the bug is in.
Affected module(s)
Which package or class is the bug in, if known.
Expected behavior, and steps to reproduce if appropriate
A clear and concise description of what you expected to happen,
and how you got there.
Feel free to include a text/log extract, but use a pastebin facility for any
screenshots you deem necessary.
Context
The text was updated successfully, but these errors were encountered: