FUDforum provides a login integration API that can be used to log users in from external applications (like wiki's and blogs) on to the forum.
To use the API, include the forum_login.php script into your project. This script can be found inside the forum's scripts/ directory.
Contents |
This API provides the following functions:
Lookup a forum $user_id from a username and password combination:
int external_get_user_by_auth ( char $login, char $passwd )
Return a forum $user_id or NULL if the username and/or password is incorrect.
Log a user into the forum.
int external_fud_login ( int $user_id )
Return session id.
Register what the user is busy doing in the forum's iSpy action list. This function was introduced with FUDforum 3.0.1.
void external_fud_status ( char $action )
Log a user out from the forum.
void external_fud_logout ( int $user_id )
Example PHP script to authenticate 'user1/pass' against the forum database and log them on to the forum:
<?php ini_set('display_errors', 1); include_once('GLOBALS.php'); include_once('forum_login.php'); echo 'Authenticate against the forum DB.<br />'; $user_id = external_get_user_by_auth('user1', 'pass'); echo 'Login to forum.<br />'; $ses_id = external_fud_login($user_id); echo 'Set action.<br />'; external_fud_status('Busy doing laundry...'); // echo 'Log the user out.<br />'; // external_fud_logout($user_id); ?>
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Can't contact the database server: Cannot return last error, no db connection)