<?php
/**
 * Pi Engine (http://piengine.org)
 *
 * @link            http://code.piengine.org for the Pi Engine source repository
 * @copyright       Copyright (c) Pi Engine http://piengine.org
 * @license         http://piengine.org/license.txt BSD 3-Clause License
 */

namespace Module\User\Controller\Front;

/**
 * Dashboard controller
 *
 * @author Frédéric TISSOT <contact@espritdev.fr>
 */
class DashboardProController extends DashboardController
{
    public function indexAction()
    {
        $this->view()->headTitle(__('My Pro Dashboard'));
        parent::indexAction(); // TODO: Change the autogenerated stub

        // Get config
        $config = Pi::service('registry')->config->read('user');

        // Check dashboard active
        if (!$config['dashboard_enable']) {
            return $this->jump([
                'controller' => 'profile',
                'action'     => 'index',
            ]);
        }
    }
}
