CHANGELOG
README
INSTALL
This class provides every function you need to manage virtual users. It can handle users stored in a MySQL or PostgreSQL database.
[line 34]
[line 22]
[line 28]
pureuseradmin __construct( )
This function is called as soon as an instance of the class is created. It will init the settings, connect to the database and load the uids and gids on the system.
$instance = new pureuseradmin();
void changeSetting( string $setting, string $value)
$instance->changeSetting("setting", "value");
array check_access( string $homedir, int $uid, int $gid)
$permission = $instance->check_access("/home/test",1001,1001);
void db_init( )
Make connection to the database server, select the right database and include the file with database specific functions.
self::dbinit();
boolean delete_user( array $userinfo)
$result = $instance->delete_user($userinfo);
array get_all_users( )
$userlist = $instance->get_all_users();
array get_user( array $userinfo)
$userlist = $instance->get_user($userinfo);
array load_gids( )
self::load_gids();
void load_sql( string $sql_type)
Check wether the needed database module is loaded as php module. If not, try to load it now.
self::load_sql($sql_type);
array load_uids( )
self::load_uids();
string mkpass( string $passwd)
$pass = self::mkpass("password");
boolean save_user( array $userinfo)
$result = $instance->save_user($userinfo);
[line 16]