From 49a0d8db8a06c418072a7ff2089792936f1f4937 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sat, 31 Mar 2001 12:03:38 +0000 Subject: [PATCH] Add missing ';' and alter version checking in hook_admin_deleteaccount --- admin/deleteaccount.php | 2 +- admin/inc/hook_admin_deleteaccount.inc.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/admin/deleteaccount.php b/admin/deleteaccount.php index d4fea9875d..58869481f0 100755 --- a/admin/deleteaccount.php +++ b/admin/deleteaccount.php @@ -57,7 +57,7 @@ } if($submit=='Delete') { - $accountid = $account_id + $accountid = $account_id; settype($account_id,'integer'); $account_id = get_account_id($accountid); $lid = $phpgw->accounts->id2name($account_id); diff --git a/admin/inc/hook_admin_deleteaccount.inc.php b/admin/inc/hook_admin_deleteaccount.inc.php index ca709f1864..628a82eb4d 100755 --- a/admin/inc/hook_admin_deleteaccount.inc.php +++ b/admin/inc/hook_admin_deleteaccount.inc.php @@ -12,10 +12,13 @@ /* $Id$ */ // Delete all records for a user - if (floor($PHP_VERSION ) == 4) + if (floor(phpversion()) == 4) { global $phpgw, $account_id; } - $phpgw->accounts->delete($account_id); + if($account_id) + { + $phpgw->accounts->delete($account_id); + } ?>