29 lines
791 B
PHP
29 lines
791 B
PHP
<?php
|
|
require_once("../common_cadline_libraries/crm_database.class.php");
|
|
require_once '../maintenance/PasswordHash.php';
|
|
|
|
define('_JEXEC', 1);
|
|
define('DS', DIRECTORY_SEPARATOR);
|
|
define('JPATH_BASE', $_SERVER['DOCUMENT_ROOT']);
|
|
|
|
require_once(JPATH_BASE . DS . 'includes' . DS . 'defines.php');
|
|
require_once(JPATH_BASE . DS . 'includes' . DS . 'framework.php');
|
|
|
|
jimport('joomla.user.helper');
|
|
jimport('joomla.session.session');
|
|
|
|
$username = $_POST['username'];
|
|
$password = $_POST['password'];
|
|
$lang = $_POST['lang'];
|
|
|
|
$app = JFactory::getApplication('site');
|
|
$session = JFactory::getSession();
|
|
|
|
$credentials = array();
|
|
$credentials['username'] = $username;
|
|
$credentials['password'] = $password;
|
|
|
|
$error = $app->login($credentials);
|
|
|
|
header('Location: ' . $_POST['url']);
|