'mysql://wikiuser:@localhost/phpwiki', // USER => PASSWORD // plaintext passwords: //'auth_check' => 'SELECT IF(passwd="$password",1,0) as ok FROM user WHERE userid="$userid"', // database (md5) passwords: 'auth_check' => 'SELECT IF(passwd=PASSWORD("$password"),1,0) as ok FROM user WHERE userid="$userid"', // 'auth_crypt_method' = 'crypt': //'auth_check' => 'SELECT password as password FROM user WHERE username="$userid"', // this is only needed with auth_crypt_method plain 'auth_user_exists' => 'SELECT userid FROM user WHERE userid="$userid"', //'auth_crypt_method' => 'crypt', // 'crypt' (unix) or 'md5' (mysql) or just 'plain' 'auth_crypt_method' => 'plain', // plain or mysql PASSWORD() // If 'auth_update' is not defined but 'auth_check' is defined, the user cannot // change his password. // $password is processed by the 'auth_crypt_method'. //don't create new users: 'auth_update' => 'UPDATE user SET passwd="$password" WHERE userid="$userid"', //create new users: //'auth_update' => 'REPLACE INTO user SET passwd="$password", userid="$userid"', // USER => PREFERENCES // This can be optionally defined in the phpwiki db. // The default is to store it the users homepage. // If you choose the user table, only registered user get their prefs from the DB, // self-created users not. Better use the special pref table. //'pref_select' => 'SELECT prefs FROM user WHERE userid="$userid"', 'pref_select' => 'SELECT prefs FROM pref WHERE userid="$userid"', //Don't use replace with user or all other fields here get erased! (passwords e.g.) //'pref_update' => 'UPDATE user SET prefs="$pref_blob" WHERE userid="$userid"', // The special prefs table is safe to erase. All users can store their prefs here. 'pref_update' => 'REPLACE INTO pref SET prefs="$pref_blob",userid="$userid"', // USERS <=> GROUPS // DB methods for lib/WikiGroup.php, see also AUTH_GROUP_FILE above. // you can define 1:n or n:m user<=>group relations, as you wish. // Sample configurations // only one group per user: //'is_member' => 'SELECT 1 FROM user WHERE user=$userid"" AND group="$groupname"', //'group_members' => 'SELECT user FROM user WHERE group="$groupname"', //'user_groups' => 'SELECT group FROM user WHERE user="$userid"', // or // multiple groups per user (n:m): // All members of the group: 'group_members' => 'SELECT userid FROM member WHERE groupname="$groupname"', // All groups this user belongs to: 'user_groups' => 'SELECT groupname FROM member WHERE userid="$userid"', 'is_member' => 'SELECT userid FROM member WHERE userid="$userid" AND groupname="$groupname"', 'dummy' => false, ); */ include("lib/main.php"); ?>