We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79b2a3b commit e7ba639Copy full SHA for e7ba639
src/Application/UI/Presenter.php
@@ -299,8 +299,11 @@ protected function shutdown(Application\IResponse $response)
299
public function checkRequirements($element): void
300
{
301
$user = (array) ComponentReflection::parseAnnotation($element, 'User');
302
- if (in_array('loggedIn', $user, true) && !$this->getUser()->isLoggedIn()) {
303
- throw new Application\ForbiddenRequestException;
+ if (in_array('loggedIn', $user, true)) {
+ trigger_error(__METHOD__ . '() annotation @User is deprecated', E_USER_DEPRECATED);
304
+ if (!$this->getUser()->isLoggedIn()) {
305
+ throw new Application\ForbiddenRequestException;
306
+ }
307
}
308
309
0 commit comments