diff --git a/html/inc/user.inc b/html/inc/user.inc index 483403c218..3f57c54f92 100644 --- a/html/inc/user.inc +++ b/html/inc/user.inc @@ -78,6 +78,7 @@ function get_other_projects($user) { // $remote = @json_decode(json_encode((array)$xml_object))->project; if (!$remote) { + $user->projects = null; return $user; } if (count($remote) == 1) { diff --git a/html/user/cert_all.php b/html/user/cert_all.php index 13adc0c691..82e8837255 100644 --- a/html/user/cert_all.php +++ b/html/user/cert_all.php @@ -38,6 +38,11 @@ if ($border=="no") { $font = "\"Optima,Lucida Bright,Times New Roman\""; $user = get_other_projects($user); + +if (!$user->projects) { + error_page("No accounts found"); +} + $total_credit = 0; foreach ($user->projects as $p) { $total_credit += $p->total_credit;