Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when session isn't started user panel templates throw nette exception #7

Closed
iinfo-dev-mk opened this issue Sep 26, 2014 · 0 comments
Closed

Comments

@iinfo-dev-mk
Copy link

When session isn't started and Tracy with user panel and tab (Bridges/SecurityTracy/templates/UserPanel*.phtml) is used, nette exception (or php warning) 'Cannot send header after HTTP headers have been sent' is presented.

It's because of both templates directly check (e.g. there) nette user which tries to start session.

Suggested Solution: to check if session is started before nette user/identity is checked - e.g.

<?php if (session_id() && $user->isLoggedIn()): ?>Logged in<?php else: ?>Unlogged<?php endif ?>

Described problem is presented in both templates - UserPanel.panel.phtml, UserPanel.tab.phtml

@iinfo-dev-mk iinfo-dev-mk changed the title when session isn't started user panel templates throws nette exception when session isn't started user panel templates throw nette exception Sep 26, 2014
@dg dg closed this as completed in a425793 Oct 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant