phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_sql.inc.php, 1.80.2.


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.accounts_sql.inc.php, 1.80.2.8.2.6, 1.80.2.8.2.7
Date: Tue, 09 Sep 2003 20:33:02 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv17812

Modified Files:
      Tag: Version-0_9_16-branch
        class.accounts_sql.inc.php 
Log Message:
fix for bugs 5176 5177


Index: class.accounts_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.accounts_sql.inc.php,v
retrieving revision 1.80.2.8.2.6
retrieving revision 1.80.2.8.2.7
diff -C2 -r1.80.2.8.2.6 -r1.80.2.8.2.7
*** class.accounts_sql.inc.php  24 Jun 2003 11:46:04 -0000      1.80.2.8.2.6
--- class.accounts_sql.inc.php  10 Sep 2003 00:33:00 -0000      1.80.2.8.2.7
***************
*** 88,93 ****
                        $this->data['account_id']        = 
$this->db->f('account_id');
                        $this->data['account_lid']       = 
$this->db->f('account_lid');
!                       $this->data['firstname']         = 
$this->db->f('account_firstname');
!                       $this->data['lastname']          = 
$this->db->f('account_lastname');
                        $this->data['fullname']          = 
$this->db->f('account_firstname') . ' ' . $this->db->f('account_lastname');
                        $this->data['lastlogin']         = 
$this->db->f('account_lastlogin');
--- 88,93 ----
                        $this->data['account_id']        = 
$this->db->f('account_id');
                        $this->data['account_lid']       = 
$this->db->f('account_lid');
!                       $this->data['account_firstname']         = 
$this->db->f('account_firstname');
!                       $this->data['account_lastname']          = 
$this->db->f('account_lastname');
                        $this->data['fullname']          = 
$this->db->f('account_firstname') . ' ' . $this->db->f('account_lastname');
                        $this->data['lastlogin']         = 
$this->db->f('account_lastlogin');
***************
*** 96,99 ****
--- 96,100 ----
                        $this->data['status']            = 
$this->db->f('account_status');
                        $this->data['expires']           = 
$this->db->f('account_expires');
+                       $this->data['person_id']           = 
$this->db->f('person_id');
  
                        return $this->data;
***************
*** 106,113 ****
                function save_repository()
                {
!                       $this->db->query("UPDATE phpgw_accounts SET 
account_firstname='" . $this->data['firstname']
!                               . "', account_lastname='" . 
$this->data['lastname'] . "', account_status='"
                                . $this->data['status'] . "', account_expires=" 
. $this->data['expires']
                                . ($this->data['account_lid']?", 
account_lid='".$this->data['account_lid']."'":'')
                                . ' WHERE account_id=' . 
intval($this->account_id),__LINE__,__FILE__);
                }
--- 107,115 ----
                function save_repository()
                {
!                       $this->db->query("UPDATE phpgw_accounts SET 
account_firstname='" . $this->data['account_firstname']
!                               . "', account_lastname='" . 
$this->data['account_lastname'] . "', account_status='"
                                . $this->data['status'] . "', account_expires=" 
. $this->data['expires']
                                . ($this->data['account_lid']?", 
account_lid='".$this->data['account_lid']."'":'')
+                               . ($this->data['person_id']?", 
person_id=".$this->data['person_id']:'')
                                . ' WHERE account_id=' . 
intval($this->account_id),__LINE__,__FILE__);
                }
***************
*** 338,347 ****
                function create($account_info,$default_prefs=True)
                {
                        $this->db->query('insert into phpgw_accounts 
(account_lid, account_type, account_pwd, '
!                               . "account_firstname, account_lastname, 
account_status, account_expires) values ('"
                                . $account_info['account_lid'] . "','" . 
$account_info['account_type'] . "','"
                                . md5($account_info['account_passwd']) . "', '" 
. $account_info['account_firstname']
                                . "','" . $account_info['account_lastname'] . 
"','" . $account_info['account_status']
!                               . "'," . $account_info['account_expires'] . 
')',__LINE__,__FILE__);
  
                        $accountid = 
$this->db->get_last_insert_id('phpgw_accounts','account_id');
--- 340,350 ----
                function create($account_info,$default_prefs=True)
                {
+                       $person_id = 
$account_info['person_id']?$account_info['person_id']:'NULL';
                        $this->db->query('insert into phpgw_accounts 
(account_lid, account_type, account_pwd, '
!                               . "account_firstname, account_lastname, 
account_status, account_expires, person_id) values ('"
                                . $account_info['account_lid'] . "','" . 
$account_info['account_type'] . "','"
                                . md5($account_info['account_passwd']) . "', '" 
. $account_info['account_firstname']
                                . "','" . $account_info['account_lastname'] . 
"','" . $account_info['account_status']
!                               . "'," . $account_info['account_expires'] . ", 
" . $person_id . ')',__LINE__,__FILE__);
  
                        $accountid = 
$this->db->get_last_insert_id('phpgw_accounts','account_id');





reply via email to

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