Completed
Branch master (bf361a)
by Pierre-Henry
35:18
created

system/modules/validate-site/config/Permission.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * @author         Pierre-Henry Soria <[email protected]>
4
 * @copyright      (c) 2015-2017, Pierre-Henry Soria. All Rights Reserved.
5
 * @license        GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
6
 * @package        PH7 / App / System / Module / Validate Site / Config
7
 */
8
9
namespace PH7;
10
11
defined('PH7') or exit('Restricted access');
12
13
use
0 ignored issues
show
There must be a single space after the USE keyword
Loading history...
14
PH7\Framework\Layout\Html\Design,
15
PH7\Framework\Mvc\Router\Uri,
16
PH7\Framework\Url\Header;
17
18
class Permission extends PermissionCore
19
{
20
    public function __construct()
21
    {
22
        parent::__construct();
23
24
        if (!AdminCore::auth()) {
25
            // For security reasons, we don't redirect the user to the admin panel URL
26
            Header::redirect(
27
                Uri::get('user','main','login'),
28
                $this->adminSignInMsg(),
29
                Design::ERROR_TYPE
30
            );
31
        }
32
    }
33
}
34