Jump to content

back office direct login


Şahin YILDIZ

Recommended Posts

<?php

if (!defined('_PS_ADMIN_DIR_')) {
  define('_PS_ADMIN_DIR_', getcwd());
}
include_once(dirname(__FILE__).'/../config/config.inc.php');
Context::getContext()->controller = 'AdminController';
include_once(dirname(__FILE__).'/../init.php');

$login = new AdminLoginController();
$_POST['email'] = '[email protected]';
$_POST['passwd'] = 'Demo743123';
$_POST['redirect'] = 'AdminDashboard';
$login->processLogin();
$redirect = Context::getContext()->link->getAdminLink($_POST['redirect']);
$redirect .= '&configure=ordersexport';
Tools::redirectAdmin($redirect);

 

It works on Prestashop 1.6 and 1.7.

How to run it in Prestashop 8?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...