<?php
# Handle a user forum login
require_once("./include/api/base.php");
require_once("./include/api/user.php");
// Check the username and password.
"username", // the username to check
"password" // the password to check
);
if (!$user_id) die("Username or password incorrect!\n");
// Make the authenticated user the active user for Phorum. This is all
// that is needed to tell Phorum that this user is logged in.
$user_id, // the user_id that has to be the active user
);
if (!$set_active) die("Setting user_id $user_id as the active user failed!\n");
// Create a session for the active user, so the user will be remembered
// on subsequent requests.
); // appropriate at login time
?>