guirovagano in rete ho trovato questo ma non funziona:
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
require_once (JPATH_BASE .DS. 'libraries' .DS. 'joomla'. DS. 'user' .DS. 'authentication.php');
$mainframe = JFactory::getApplication('site');
$mainframe->initialise();
if(isset($_POST['username']) && isset($_POST['password']))
{
$credentials = array(
'username' => $_POST['username'],
'password' => $_POST['password']);
$options = array();
$authenticate = JAuthentication::getInstance();
$response = $authenticate->authenticate($credentials, $options);
if ($response->status === JAUTHENTICATE_STATUS_SUCCESS) {
$user = JUser::getInstance($_POST['username']);
$_SESSION['__default']['user']=$user;
header("Location:./index.php");
}else
echo "Error Login";
}
?>
<form method="post" action="">
<table>
<tr><td><b>Username:</b></td><tr><tr><td><input type="text" name="username" id="username" /> </td></tr>
<tr><td><b>Password:</b></td><tr><tr><td><input type="password" name="password" id="password" /> </td></tr>
<tr><td><input type="submit" value="Login" /></td></tr>
</table>
</form>