phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc/accounts class.accounts_ldap.inc.p...


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc/accounts class.accounts_ldap.inc.p...
Date: Wed, 22 Mar 2006 12:42:20 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Branch:         
Changes by:     Dave Hall <address@hidden>      06/03/22 12:42:20

Modified files:
        inc/accounts   : class.accounts_ldap.inc.php 
                         class.accounts_sql.inc.php 

Log message:
        add the missing member variables needed in admin

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/inc/accounts/class.accounts_ldap.inc.php.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/inc/accounts/class.accounts_sql.inc.php.diff?tr1=1.9&tr2=1.10&r1=text&r2=text

Patches:
Index: phpgwapi/inc/accounts/class.accounts_ldap.inc.php
diff -u phpgwapi/inc/accounts/class.accounts_ldap.inc.php:1.4 
phpgwapi/inc/accounts/class.accounts_ldap.inc.php:1.5
--- phpgwapi/inc/accounts/class.accounts_ldap.inc.php:1.4       Sun Mar 12 
12:45:47 2006
+++ phpgwapi/inc/accounts/class.accounts_ldap.inc.php   Wed Mar 22 12:42:19 2006
@@ -11,7 +11,7 @@
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage accounts
-       * @version $Id: class.accounts_ldap.inc.php,v 1.4 2006/03/12 12:45:47 
Caeies Exp $
+       * @version $Id: class.accounts_ldap.inc.php,v 1.5 2006/03/22 12:42:19 
skwashd Exp $
        */
 
        /**
@@ -21,7 +21,7 @@
        * @subpackage accounts
        * @ignore
        */
-       class Accounts_LDAP extends accounts_
+       class accounts_ldap extends accounts_
        {
                var $ds;
                var $user_context  = '';
@@ -49,7 +49,7 @@
                                                    'todo'
                                                                      );
 
-               function Accounts_LDAP($account_id = null, $account_type = null)
+               function accounts_ldap($account_id = null, $account_type = null)
                {
                        $this->ds = $GLOBALS['phpgw']->common->ldapConnect();
                        $this->user_context  = 
$GLOBALS['phpgw_info']['server']['ldap_context'];
@@ -76,19 +76,19 @@
                        /* Now dump it into the array; take first entry found */
                        if($acct_type == 'g')
                        {
-                               $this->data['account_id']           = 
$allValues[0]['gidnumber'][0];
-                               $this->data['account_lid']          = 
$allValues[0]['cn'][0];
-                               $this->data['account_firstname']    = 
utf8_decode($allValues[0]['cn'][0]);
-                               $this->data['account_lastname']     = 'Group';
-                               $this->data['type']                 = 'g';
+                               $this->account_id       = 
$this->data['account_id']             = $allValues[0]['gidnumber'][0];
+                               $this->lid              = 
$this->data['account_lid']            = $allValues[0]['cn'][0];
+                               $this->firstname        = 
$this->data['account_firstname']      = utf8_decode($allValues[0]['cn'][0]);
+                               $this->lastname         = 
$this->data['account_lastname']       = 'Group';
+                               $this->account_type     = $this->data['type']   
                = 'g';
                        }
                        else
                        {
-                               $this->data['account_id']           = 
$allValues[0]['uidnumber'][0];
-                               $this->data['account_lid']          = 
$allValues[0]['uid'][0];
-                               $this->data['account_firstname']    = 
utf8_decode($allValues[0]['givenname'][0]);
-                               $this->data['account_lastname']     = 
utf8_decode($allValues[0]['sn'][0]);
-                               $this->data['type']                 = 'u';
+                               $this->account_id       = 
$this->data['account_id']             = $allValues[0]['uidnumber'][0];
+                               $this->lid              = 
$this->data['account_lid']            = $allValues[0]['uid'][0];
+                               $this->firstname        = 
$this->data['account_firstname']      = 
utf8_decode($allValues[0]['givenname'][0]);
+                               $this->lastname         = 
$this->data['account_lastname']       = utf8_decode($allValues[0]['sn'][0]);
+                               $this->account_type     = $this->data['type']   
                = 'u';
                        }
                        $this->data['account_dn']             = 
$allValues[0]['dn'];
                        $this->data['fullname']               = 
utf8_decode($allValues[0]['cn'][0]);
@@ -96,18 +96,16 @@
                        $this->data['homedirectory']          = 
$allValues[0]['homedirectory'][0];
                        $this->data['loginshell']             = 
$allValues[0]['loginshell'][0];
 
-                       $this->data['account_expires']        = 
$allValues[0]['phpgwaccountexpires'][0];
-                       $this->data['expires']                = 
$allValues[0]['phpgwaccountexpires'][0];
+                       $this->expires          = $this->data['expires'] = 
$this->data['account_expires'] = $allValues[0]['phpgwaccountexpires'][0];
                        //$allValues[0]['description'][0] is not needed
                        if ($allValues[0]['phpgwaccountstatus'][0] == 'A')
                        {
-                               $this->data['status'] = 'A';
+                               $this->status = $this->data['status'] = 'A';
                        }
                        
                        if ( $allValues[0]['phpgwcontactid'][0] )
                        {
-                               $this->data['person_id']  = 
$allValues[0]['phpgwcontactid'][0];
-                               $this->account_contact_id       = 
$this->data['person_id'];
+                               $this->person_id                = 
$this->data['person_id'] = $allValues[0]['phpgwcontactid'][0];
                        }
                        return $this->data;
                }
Index: phpgwapi/inc/accounts/class.accounts_sql.inc.php
diff -u phpgwapi/inc/accounts/class.accounts_sql.inc.php:1.9 
phpgwapi/inc/accounts/class.accounts_sql.inc.php:1.10
--- phpgwapi/inc/accounts/class.accounts_sql.inc.php:1.9        Mon Mar 20 
09:21:39 2006
+++ phpgwapi/inc/accounts/class.accounts_sql.inc.php    Wed Mar 22 12:42:19 2006
@@ -8,7 +8,7 @@
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage accounts
-       * @version $Id: class.accounts_sql.inc.php,v 1.9 2006/03/20 09:21:39 
sigurdne Exp $
+       * @version $Id: class.accounts_sql.inc.php,v 1.10 2006/03/22 12:42:19 
skwashd Exp $
        */
 
        /**
@@ -67,21 +67,17 @@
                        $this->db->query('SELECT * FROM phpgw_accounts WHERE 
account_id=' . intval($this->account_id),__LINE__,__FILE__);
                        $this->db->next_record();
 
-                       $this->data['userid']                           = 
$this->db->f('account_lid');
-                       $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['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->account_id               = 
$this->data['account_id']     = $this->db->f('account_id');
+                       $this->lid                      = $this->data['userid'] 
        = $this->data['account_lid'] = $this->db->f('account_lid');
+                       $this->firstname                = 
$this->data['firstname']      = $this->data['account_firstname'] = 
$this->db->f('account_firstname');
+                       $this->lastname                 = 
$this->data['lastname']       = $this->data['account_lastname'] = 
$this->db->f('account_lastname');
+                       $this->data['fullname']         = "{$this->firstname} 
{$this->lastname}";
                        $this->data['lastlogin']                        = 
$this->db->f('account_lastlogin');
                        $this->data['lastloginfrom']            = 
$this->db->f('account_lastloginfrom');
                        $this->data['lastpasswd_change']        = 
$this->db->f('account_lastpwd_change');
-                       $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');
+                       $this->status                   = $this->data['status'] 
        = $this->db->f('account_status');
+                       $this->expired                  = 
$this->data['expires']        = $this->db->f('account_expires');
+                       $this->person_id                = 
$this->data['person_id']      = $this->db->f('person_id');
                        $this->data['quota']                            = 
$this->db->f('account_quota');
                        return $this->data;
                }
@@ -184,6 +180,7 @@
 
                        while ($this->db->next_record())
                        {
+                               //echo '<pre>' . print_r($this->db->Record, 
true) . '</pre>';
                                $accounts[] = array
                                                (
                                                        'account_id'            
=> $this->db->f('account_id'),




reply via email to

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