Hi, I am very new in Oxwall. I want to login to oxwall site using login to other website.
My code is:
<?php
define('OW_URL_HOME', '
http://localhost/oxwall_new/index.php');
define('_OW_', true);
define('DS', DIRECTORY_SEPARATOR);
define('OW_DIR_ROOT', dirname(__FILE__) . DS);
require_once(OW_DIR_ROOT . 'ow_includes' . DS . 'init.php');
require_once(OW_DIR_ROOT . 'ow_system_plugins' . DS . 'base/classes/standard_auth.php');
require_once(OW_DIR_ROOT . 'ow_core' . DS . 'session.php');
$username = $_GET['username'];
$password = $_GET['password'];
$adapter = new BASE_CLASS_StandardAuth($username,$password);
$result = OW::getUser()->authenticate($adapter, true);
if ( $result->isValid() )
{
if ( isset($data['remember']) )
{
$loginCookie = $this->userService->saveLoginCookie(OW::getUser()->getId());
setcookie('ow_login', $loginCookie->getCookie(), (time() + 86400 * 7), '/', null, null, true);
}
}
session_regenerate_id();
header('Location:
http://localhost/oxwall_new/index.php')
?>
Using this code i am redirecting to oxwall site when i login through other website. but not logged in to oxwall site. If i see in data base there is one table "
ow_base_user_online" which shows an entry for on-line user.
i am unable to understand if i am not logged in how it can show this entry for user 1 & if it is showing entry in this table then why i am not logged in to oxwall site.
please help & let me know if doing anything wrong. Help would be appreciated. thanks in advance. waiting for reply