[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/doc/ -> class.accounts (source)

   1  // There is a accounts_shared which added functions that are identical for all 
   2  
   3  class accounts_{
   4    var $db;
   5    var $account_id;
   6    var $data;
   7    var $memberships;
   8    var $members;
   9    
  10    function read_repository()
  11    {
  12      /**************************************************************************\
  13      * Read values for $this->account_id and put them into $this->data and      *
  14      * then return $this->data                                                  *
  15      *                                                                          *
  16      * These are the values that should be set:                                 *
  17      * $this->data["account_id"]                                                *
  18      * $this->data["account_lid"]                                               *
  19      * $this->data["account_type"]                                               *
  20      * $this->data["firstname"]                                                 *
  21      * $this->data["lastname"]                                                  *
  22      * $this->data["fullname"]                                                  *
  23      * $this->data["lastlogin"]                                                 *
  24      * $this->data["lastloginfrom"]                                             *
  25      * $this->data["lastpasswd_change"]                                         *
  26      * $this->data["status"]                                                    *
  27      \**************************************************************************/
  28    }
  29  
  30  /**************************************************************************\
  31  * These are the standard $this->account_id specific functions              *
  32  \**************************************************************************/
  33  
  34    function save_repository(){
  35      /**************************************************************************\
  36      * Store the values in $this->data to the repository                        *
  37      \**************************************************************************/
  38    }
  39  
  40  /**************************************************************************\
  41  * These are the generic functions. Not specific to $this->account_id       *
  42  \**************************************************************************/
  43  
  44    function add($account_name, $account_type, $first_name, $last_name, $passwd = False) {
  45      /**************************************************************************\
  46      * Create a new account. Password is optional because of our seperated      *
  47      * auth class structure                                                     *
  48      \**************************************************************************/
  49    }
  50  
  51    function delete($account_id) {
  52      /**************************************************************************\
  53      * Accept both acount_name or account_id and use name2id to convert to id   *
  54      * delete account. I have not worked the details of how hooks will be used  *
  55      * by apps to delete the users data. For now ignore the issue.              *
  56      \**************************************************************************/
  57    }
  58    
  59    function get_list()
  60    {
  61      /**************************************************************************\
  62      * Return a list of users                                                   *
  63      \**************************************************************************/
  64    }
  65    
  66    function name2id($account_name)
  67    {
  68      /**************************************************************************\
  69      * Return the account_id for the account_name requested                     *
  70      * Return False if you cannot find the given account_name                   *
  71      \**************************************************************************/
  72    }
  73    
  74    function id2name($account_id)
  75    {
  76      /**************************************************************************\
  77      * Return the account_id for the account_name requested                     *
  78      * Return False if you cannot find the given account_name                   *
  79      \**************************************************************************/
  80    }
  81    
  82    function get_type($account_id)
  83    {
  84      /**************************************************************************\
  85      * Return the account_type for the account_id requested                     *
  86      * Return False if you cannot find the given account_id                     *
  87      \**************************************************************************/
  88    }
  89    
  90    function exists($accountname)
  91    {
  92      /**************************************************************************\
  93      * Check to see if an account exists. If string is sent,                    *
  94      * use $this->name2id to get the id.                                        *
  95      * Return True or False as appropriate                                      *
  96      \**************************************************************************/
  97    }
  98    
  99    function auto_add($account_name, $passwd, $default_prefs=False, $default_acls= False)
 100    {
 101      /**************************************************************************\
 102      * This is used to auto create an account. First make sure the account_name *
 103      * doesnt exist by using $this->exists and then create the account.         *
 104      * This function still needs to have some details worked out for dealing    *
 105      * the default values.                                                      *
 106      \**************************************************************************/
 107    }
 108  }  //end of class
 109  ?>


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7