08-22-2008, 09:18 AM
[eluser]Fenix[/eluser]
With the MVC pattern, is it ok to put something like this in a view?
More specifically, is it ok to actually check the session for things like this right in the view? Something like:
With the MVC pattern, is it ok to put something like this in a view?
Code:
if logged in
show logout link
else
show login link
end if
More specifically, is it ok to actually check the session for things like this right in the view? Something like:
Code:
if ($this->session->userdata('id') >0)
{
// show logout
}
else
{
// show login
}