From 6bf85f7808b869ee8e8b73632810edec0fe7d8cd Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 9 Oct 2024 10:40:08 -0600 Subject: [PATCH] Admin: Avoid deprecated accounts->read() usage when importing accounts->read() requires an ID --- admin/inc/class.admin_egw_group_record.inc.php | 9 +++++++-- admin/inc/class.admin_egw_user_record.inc.php | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/admin/inc/class.admin_egw_group_record.inc.php b/admin/inc/class.admin_egw_group_record.inc.php index 7013205393..e78c8b99b9 100644 --- a/admin/inc/class.admin_egw_group_record.inc.php +++ b/admin/inc/class.admin_egw_group_record.inc.php @@ -37,10 +37,15 @@ class admin_egw_group_record implements importexport_iface_egw_record public function __construct( $_identifier='' ) { if(is_array($_identifier)) { $this->identifier = $_identifier['account_id']; - } else { + } + else + { $this->identifier = $_identifier; } - $this->set_record($GLOBALS['egw']->accounts->read($this->identifier)); + if($this->identifier) + { + $this->set_record($GLOBALS['egw']->accounts->read($this->identifier)); + } } /** diff --git a/admin/inc/class.admin_egw_user_record.inc.php b/admin/inc/class.admin_egw_user_record.inc.php index 7459c8ad25..479a23f36d 100644 --- a/admin/inc/class.admin_egw_user_record.inc.php +++ b/admin/inc/class.admin_egw_user_record.inc.php @@ -41,7 +41,10 @@ class admin_egw_user_record implements importexport_iface_egw_record } else { $this->identifier = $_identifier; } - $this->set_record($GLOBALS['egw']->accounts->read($this->identifier)); + if($this->identifier) + { + $this->set_record($GLOBALS['egw']->accounts->read($this->identifier)); + } } /**