Roxen.git / server / modules / examples / userdb_ex.pike

version» Context lines:

Roxen.git/server/modules/examples/userdb_ex.pike:21:   constant name = "example";   //! The name of the userdatbase, used to identify it from modules or   //! htaccess files or similar that wants to authenticate against a   //! specific database instead of against any of them.   //!   //! The name should be reasonably short and should be unique, however,   //! nothing will break if more than one database has the same name, it   //! will be impossible to know which of them will be used when   //! authentication is done, however..    - constant cvs_version="$Id: userdb_ex.pike,v 1.3 2001/10/09 18:07:50 nilsson Exp $"; + constant cvs_version="$Id: userdb_ex.pike,v 1.4 2002/10/22 08:49:08 jonasw Exp $";      LocaleString module_name = LOCALE(1,"RefDoc for MODULE_USERDB");      LocaleString module_doc =    LOCALE(2,"This module does nothing special, it implements a simple "    "user database with the passwords and usernames in a string list, "    "but its inlined documentation gets imported into the Roxen "    "programmer manual.\n"    "You definetely don't want to use this module in your virtual "    "servers, since anybody with access to your admin interface or "
Roxen.git/server/modules/examples/userdb_ex.pike:151:    //! implementation returns ({})    {    // We return a single group, this is the group that all users are    // placed in by this module.    return ({ "example" });    }   }         class ExGroup + //! ExGroup.   {    inherit Group;    //! All groups should inherit the group class.       static void create()    // Call the constructor in the parent class.    {    ::create( this_module() );    }          string name()    //! The group name    {    // Our one and only group is named example.    return "example";    } -  +     int gid()    //! A numerical GID, or -1 if not applicable    {    return -1;    }       array(string) members()    //! All users that are members of this group. The default    //! implementation loops over all users handled by the user database    //! and looks for users with the same gid as this group.