Redirect wishlists to login if user is not logged in
This commit is contained in:
parent
4fc8c9f3c1
commit
4896b37d87
2 changed files with 8 additions and 8 deletions
|
@ -149,13 +149,6 @@ class Page
|
|||
*/
|
||||
$user = isset($_SESSION['user']->id) ? $_SESSION['user'] : new User();
|
||||
|
||||
/**
|
||||
* Power
|
||||
*/
|
||||
if (isset($user->power) && $user->power < $this->power && 0 !== $this->power) {
|
||||
redirect(Page::PAGE_POWER . '&required=' . $this->power);
|
||||
}
|
||||
|
||||
/**
|
||||
* Login
|
||||
*/
|
||||
|
@ -167,6 +160,13 @@ class Page
|
|||
redirect(Page::PAGE_LOGIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Power
|
||||
*/
|
||||
if (isset($user->power) && $user->power < $this->power && 0 !== $this->power) {
|
||||
redirect(Page::PAGE_POWER . '&required=' . $this->power);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update
|
||||
*/
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
namespace wishthis;
|
||||
|
||||
$page = new Page(__FILE__, __('My lists'));
|
||||
$page = new Page(__FILE__, __('My lists'), 1);
|
||||
$page->header();
|
||||
$page->bodyStart();
|
||||
$page->navigation();
|
||||
|
|
Loading…
Reference in a new issue