phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.accounts_sql.inc.php, 1.80.2.8.2.3


From: skwashd
Subject: [Phpgroupware-cvs] phpgwapi/inc class.accounts_sql.inc.php, 1.80.2.8.2.35
Date: Thu, 8 Dec 2005 00:28:00 +0100

Update of phpgwapi/inc

Modified Files:
     Branch: Version-0_9_16-branch
            class.accounts_sql.inc.php lines: +15 -15

Log Message:
partial fix for bug #14662

====================================================
Index: phpgwapi/inc/class.accounts_sql.inc.php
diff -u phpgwapi/inc/class.accounts_sql.inc.php:1.80.2.8.2.34 
phpgwapi/inc/class.accounts_sql.inc.php:1.80.2.8.2.35
--- phpgwapi/inc/class.accounts_sql.inc.php:1.80.2.8.2.34       Sun Nov  6 
21:41:22 2005
+++ phpgwapi/inc/class.accounts_sql.inc.php     Wed Dec  7 23:28:44 2005
@@ -411,14 +411,15 @@
                        }

                        $acct_info = array(
-                               'account_lid'       => $accountname,
-                               'account_type'      => 'u',
-                               'account_passwd'    => $passwd,
-                               'account_firstname' => '',
-                               'account_lastname'  => '',
-                               'account_status'    => $account_status,
-                               'account_expires'   => $expires,
-                               'person_id'                     => 'NULL'
+                               'account_lid'           => $accountname,
+                               'account_type'          => 'u',
+                               'account_passwd'        => $passwd,
+                               'account_firstname'     => '',
+                               'account_lastname'      => '',
+                               'account_status'        => $account_status,
+                               'account_expires'       => $expires,
+                               'person_id'             => 'NULL',
+                               'quota'                 => 0
                        );

                        $this->db->transaction_begin();
@@ -430,11 +431,11 @@
                        {
                                $default_group_lid = 
intval($GLOBALS['phpgw_info']['server']['default_group_lid']);
                                $default_group_id  = 
$this->name2id($default_group_lid);
-                               $defaultgroupid = $default_group_id ? 
$default_group_id : $this->name2id('Default');
-                               if ($defaultgroupid)
+                               $default_group_id = intval($default_group_id ? 
$default_group_id : $this->name2id('Default'));
+                               if ( $default_group_id != 0 )
                                {
                                        $this->db->query('INSERT INTO phpgw_acl 
(acl_appname, acl_location, acl_account, acl_rights)'
-                                               . "VALUES('phpgw_group', " . 
$defaultgroupid . ', '
+                                               . "VALUES('phpgw_group', 
$default_group_id, "
                                                .       intval($accountid) . ', 
1'
                                                . ')',__LINE__,__FILE__);
                                        $this->db->query('INSERT INTO phpgw_acl 
(acl_appname, acl_location, acl_account, acl_rights)'
@@ -454,12 +455,11 @@
                                                'email',
                                                'notes',
                                                'todo',
-                                               'phpwebhosting',
+                                               'filemanager',
                                                'manual'
                                        );

-                                       @reset($apps);
-                                       while(list($key,$app) = each($apps))
+                                       foreach ( $apps as $app )
                                        {
                                                $this->db->query("INSERT INTO 
phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) VALUES ('" . 
$app . "', 'run', " . intval($accountid) . ', 1)',__LINE__,__FILE__);
                                        }






reply via email to

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