4 This authentication/permission plugin, implements a user database
5 via an internal array (most simple approach).
7 You can insert passwords in cleartext(), crypt(), md5() or sha1();
8 Privilege levels ("rings") are:
9 0 - administrator rights
10 1 - privileged user (advanced functionality: uploading)
11 2 - standard services (edit, view, info, ...)
12 3 - unprivileged users (only browsing),
13 which is also default if not logged in (see EWIKI_AUTH_DEFAULT_RING)
14 Usernames and passwords are __always and everywhere__ case-sensitive!
16 To use authentication you need also:
17 - EWIKI_PROTECTED_MODE=1
19 - an auth_method plugin
20 There may be multiple "auth_userdb" plugins (like this one) enabled.
25 $ewiki_auth_user_array = array(
27 // "username" => array("password", $RING_LEVEL=2),
28 // "user2" => array("sU7oi30Zmf2KTr4", 1),
34 $ewiki_plugins["auth_userdb"][] = "ewiki_auth_user_array";
37 function ewiki_auth_user_array($username, $password) {
38 return($GLOBALS["ewiki_auth_user_array"][$username]);