- Timestamp:
- 10/14/13 17:18:20 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.5.1-evolucao/expressoAdmin1_2/inc/class.db_functions.inc.php
r8236 r8237 350 350 $user_app[] = $this->db->row(); 351 351 352 if ( count($user_app) == 0)352 if (isset($user_app) && count($user_app) == 0) 353 353 { 354 354 $sql = "INSERT INTO phpgw_acl (acl_appname, acl_location, acl_account, acl_rights) " … … 411 411 function get_user_info($uidnumber) 412 412 { 413 $user_app = array(); 413 414 // Groups 414 415 $query = "SELECT acl_location FROM phpgw_acl WHERE acl_appname = 'phpgw_group' AND acl_account = '".$uidnumber."'"; … … 424 425 $query = "SELECT acl_rights FROM phpgw_acl WHERE acl_appname = 'preferences' AND acl_location = 'changepassword' AND acl_account = '".$uidnumber."'"; 425 426 $this->db->query($query); 427 $changepassword = array(); 426 428 while($this->db->next_record()) 427 429 $changepassword[] = $this->db->row(); 428 $return['changepassword'] = $changepassword[0]['acl_rights'];430 $return['changepassword'] = isset($changepassword[0]) ? $changepassword[0]['acl_rights'] : ''; 429 431 430 432 // Apps … … 434 436 $user_apps[] = $this->db->row(); 435 437 436 if ( $user_apps)438 if (isset($user_apps) && $user_apps) 437 439 { 438 440 foreach ($user_apps as $app) … … 538 540 function delete_user($user_info) 539 541 { 542 $ids = array(); 540 543 // AGENDA 541 544 $this->db->query('SELECT calendar_id FROM calendar_signature WHERE user_uidnumber ='.$user_info['uidnumber'] . ' AND is_owner = 1' ); … … 723 726 while($this->db->next_record()) 724 727 $result[] = $this->db->row(); 725 if ( count($result) > 0)728 if (isset($result) && count($result) > 0) 726 729 return true; 727 730 else … … 839 842 $this->db->select('phpgw_acl', $colunas, $where, null, null); 840 843 841 $return ;844 $return = array(); 842 845 843 846 include_once 'class.ldap_functions.inc.php';
Note: See TracChangeset
for help on using the changeset viewer.