phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc/class.accounts.inc.php, 1.13


From: nomail
Subject: [Phpgroupware-cvs] phpgwapi/inc/class.accounts.inc.php, 1.13
Date: Thu, 29 Jul 2004 13:43:22 +0200

Update of /phpgwapi/inc
Modified Files:
        Branch: 
          class.accounts.inc.php

date: 2004/07/29 11:43:22;  author: fipsfuchs;  state: Exp;  lines: +66 -2

Log Message:
new methods to set and get object vars
=====================================================================
Index: phpgwapi/inc/class.accounts.inc.php
diff -u phpgwapi/inc/class.accounts.inc.php:1.12 
phpgwapi/inc/class.accounts.inc.php:1.13
--- phpgwapi/inc/class.accounts.inc.php:1.12    Tue Jul 27 13:11:01 2004
+++ phpgwapi/inc/class.accounts.inc.php Thu Jul 29 11:43:22 2004
@@ -171,7 +171,9 @@
                        for($idx=0; $idx<count($security_equals); $idx++)
                        {
                                $name = 
$this->id2name(intval($security_equals[$idx]));
-                               $this->members[] = Array('account_id' => 
intval($security_equals[$idx]), 'account_name' => $name);
+                               $this->members[] = array('account_id'   => 
intval($security_equals[$idx]),
+                                                        'account_name' => $name
+                                                       );
                        }
 
                        return $this->members;
@@ -182,7 +184,7 @@
                @abstract Using the common functions next_id and last_id, find 
the next available account_id
                @param $account_type (optional, default to 'u')
                */
-               function get_nextid($account_type='u')
+               function get_nextid($account_type = 'u')
                {
                        $min = 
$GLOBALS['phpgw_info']['server']['account_min_id'] ? 
$GLOBALS['phpgw_info']['server']['account_min_id'] : 0;
                        $max = 
$GLOBALS['phpgw_info']['server']['account_max_id'] ? 
$GLOBALS['phpgw_info']['server']['account_max_id'] : 0;
@@ -628,5 +630,67 @@
 
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $data));
                }
+               
+               function get_members()
+               {
+                       $return = array();
+                       for($i=0; $i < count($this->members); $i++)
+                       {
+                               if($this->members[$i]['account_id'])
+                               {
+                                       $return[] = 
$this->members[$i]['account_id'];
+                               }
+                       }
+                       return $return;
+               }
+               
+               function get_lid()
+               {
+                       return $this->data[$this->fields[1]];
+               }
+               
+               function set_lid($lid)
+               {
+                       $this->data[$this->fields[1]] = $lid;
+               }
+
+               function get_id()
+               {
+                       return $this->data[$this->fields[0]];
+               }
+               
+               function set_id($id)
+               {
+                       $this->data[$this->fields[0]] = $id;
+               }
+
+               function set_password($password)
+               {
+                       $this->data[$this->fields[4]] = $password;
+               }
+
+               function set_first_name($fname)
+               {
+                       $this->data[$this->fields[2]] = $fname;
+               }
+
+               function set_last_name($lname)
+               {
+                       $this->data[$this->fields[3]] = $lname;
+               }
+
+               function set_status($status)
+               {
+                       $this->data[$this->fields[6]] = $status;
+               }
+               
+               function set_expire($expire)
+               {
+                       $this->data[$this->fields[7]] = $expire;
+               }
+               
+               // abstract
+               function create() {}
+               
        }
 ?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]