changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / auth / userdb_array.php
1 <?php
2
3 /*
4   This authentication/permission plugin, implements a user database
5   via an internal array (most simple approach).
6
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!
15
16   To use authentication you need also:
17     - EWIKI_PROTECTED_MODE=1
18     - an auth_perm plugin
19     - an auth_method plugin
20   There may be multiple "auth_userdb" plugins (like this one) enabled.
21 */
22
23
24 #-- here!
25 $ewiki_auth_user_array = array(
26
27   // "username" => array("password", $RING_LEVEL=2),
28   // "user2"    => array("sU7oi30Zmf2KTr4", 1),
29
30 );
31
32
33 #-- glue
34 $ewiki_plugins["auth_userdb"][] = "ewiki_auth_user_array";
35
36 #-- code
37 function ewiki_auth_user_array($username, $password) {
38    return($GLOBALS["ewiki_auth_user_array"][$username]);
39 }
40
41
42 ?>