Please wait

Page actions

Example of how to login to Tiki using some backend code

Used for integration with other PHP software residing on the same server and domain. This is really basic and may not do all that is required (e.g. check that account is not expired, prompt change password, direct the user to correct group homepage, set remember me, etc...), but it does log the user in.

<?php
require_once 'tiki-setup.php';
$tikiuser = 'theusername'; // You would typically get the username information from the other application
if (!$user && $userlib->user_exists($tikiuser)) {
// first make sure that there is no current login and also that user exists
$userlib->update_expired_groups();
$userlib->update_lastlogin($user);
$_SESSION[$user_cookie_site] = $tikiuser;
}
header("Location: tiki-index.php"); // or any page you want in the Tiki

For example, the following script will log the current logged in Wordpress user (assuming that Wordpress is on the same domain but the Tiki is in a sub directory of where the Wordpress is):

<?php
require_once 'tiki-setup.php';
// WP bootstrap
require( '../wp-load.php' );
$current_user = wp_get_current_user();
if (!empty($current_user->user_login)) {
$tikiuser = $current_user->user_login; // You would typically get the username information from the other application
if (!$user && $userlib->user_exists($tikiuser)) {
// first make sure that there is no current login and also that user exists
$userlib->update_expired_groups();
$userlib->update_lastlogin($user);
$_SESSION[$user_cookie_site] = $tikiuser;
}
}
header("Location: tiki-index.php"); // or any page you want in the Tiki

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.