diff --git a/user.inc.php b/user.inc.php index 963cff58..1f9ad8b8 100644 --- a/user.inc.php +++ b/user.inc.php @@ -419,7 +419,9 @@ function user_delete($u, $type=false) call_user_func("user_delete_$type", $u); } else { /* Delete the whole user */ - foreach($u['types'] as $t) call_user_func("user_delete_$t", $u); + if(is_array($u['types']) { + foreach($u['types'] as $t) call_user_func("user_delete_$t", $u); + } $finish_delete = true; } if($finish_delete == true) {