indepth
Member
I've been working with several of the custom API and SDK scripts to try to accomplish some basic tasks. Unfortunately the two that are most useful to my exact needs are both 1-2 releases outdated.
I've managed to get everything I need working EXCEPT the ability to login from an external page (on the same site/server).
Does anyone have a routine written that will accomplish this?
I am trying to rework this login function from XenAPI, but I can't seem to get it to work.
Also, does the newest version of Xenforo manage the session in the database by default? I was thinking that might be the issue with this not working.
I've managed to get everything I need working EXCEPT the ability to login from an external page (on the same site/server).
Does anyone have a routine written that will accomplish this?
I am trying to rework this login function from XenAPI, but I can't seem to get it to work.
Also, does the newest version of Xenforo manage the session in the database by default? I was thinking that might be the issue with this not working.
Code:
public function login($username, $password, $ip_address)
{
$this->setMethod('login');
$this->setParameters(array(
'username' => $username,
'password' => $password,
'ip_address' => $ip_address
));
$response = $this->execute();
$success = setcookie(
$response['cookie_name'],
$response['cookie_id'],
$response['cookie_expiration'],
$response['cookie_path'],
$response['cookie_domain'],
$response['cookie_secure'],
TRUE
);
return $success;
}