1
0
mirror of https://github.com/EGroupware/egroupware.git synced 2024-12-22 23:00:56 +01:00
egroupware_official/phpgwapi/doc/class.accounts
2001-02-05 22:33:57 +00:00

110 lines
5.4 KiB
Plaintext

// There is a accounts_shared which added functions that are identical for all
class accounts_{
var $db;
var $account_id;
var $data;
var $memberships;
var $members;
function read_repository()
{
/**************************************************************************\
* Read values for $this->account_id and put them into $this->data and *
* then return $this->data *
* *
* These are the values that should be set: *
* $this->data["account_id"] *
* $this->data["account_lid"] *
* $this->data["account_type"] *
* $this->data["firstname"] *
* $this->data["lastname"] *
* $this->data["fullname"] *
* $this->data["lastlogin"] *
* $this->data["lastloginfrom"] *
* $this->data["lastpasswd_change"] *
* $this->data["status"] *
\**************************************************************************/
}
/**************************************************************************\
* These are the standard $this->account_id specific functions *
\**************************************************************************/
function save_repository(){
/**************************************************************************\
* Store the values in $this->data to the repository *
\**************************************************************************/
}
/**************************************************************************\
* These are the generic functions. Not specific to $this->account_id *
\**************************************************************************/
function add($account_name, $account_type, $first_name, $last_name, $passwd = False) {
/**************************************************************************\
* Create a new account. Password is optional because of our seperated *
* auth class structure *
\**************************************************************************/
}
function delete($account_id) {
/**************************************************************************\
* Accept both acount_name or account_id and use name2id to convert to id *
* delete account. I have not worked the details of how hooks will be used *
* by apps to delete the users data. For now ignore the issue. *
\**************************************************************************/
}
function get_list()
{
/**************************************************************************\
* Return a list of users *
\**************************************************************************/
}
function name2id($account_name)
{
/**************************************************************************\
* Return the account_id for the account_name requested *
* Return False if you cannot find the given account_name *
\**************************************************************************/
}
function id2name($account_id)
{
/**************************************************************************\
* Return the account_id for the account_name requested *
* Return False if you cannot find the given account_name *
\**************************************************************************/
}
function get_type($account_id)
{
/**************************************************************************\
* Return the account_type for the account_id requested *
* Return False if you cannot find the given account_id *
\**************************************************************************/
}
function exists($accountname)
{
/**************************************************************************\
* Check to see if an account exists. If string is sent, *
* use $this->name2id to get the id. *
* Return True or False as appropriate *
\**************************************************************************/
}
function auto_add($account_name, $passwd, $default_prefs=False, $default_acls= False)
{
/**************************************************************************\
* This is used to auto create an account. First make sure the account_name *
* doesnt exist by using $this->exists and then create the account. *
* This function still needs to have some details worked out for dealing *
* the default values. *
\**************************************************************************/
}
} //end of class
?>