Re: Indicia log in
Hi
I have set up the IndiciaLogin control attempting to follow the wiki instructions. What I have done works, but I can't get It to return a valid login. Any ideas appreciated.
I have been told that this method is no longer being used, so if there are details anywhere of how to implement an alternative solution this might be a better approach.
Mike
$website_id = 36;
$website_password = '(my password in here';
$readAuth = user_helper::get_read_auth($website_id, $website_password);
// set options for case insensitive name comparison and to request the user profile data
$options = array('namecase' => false, 'getprofile' => true);
// make the call to indicia core to authenticate the user. This call is encrypted.
$response = user_helper::authenticate_user($_POST['username'], $_POST['password'],
$readAuth, $website_password, $options);
// act on the result
$user_id = $response['user_id'];
if ($user_id > 0) { // authenticated successfully
// continue to logged in part of site, getting profile data if wanted
$profile = $response['profile'];
// or if we hadn't got profile on login, we could make the call on the next line.
$profile = user_helper::get_user_profile($user_id, $readAuth);
echo("hello");
} else { // not authenticated
echo("not ok");
}
(R6 User - not receiving any funding for providing this support)