web: in "all projects" certificate, show message if no projects

... rather than a certificate with PHP warnings at the top
This commit is contained in:
David Anderson 2020-10-07 16:35:12 -07:00
parent 03b2e00990
commit 7d68422e94
2 changed files with 6 additions and 0 deletions

View File

@ -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) {

View File

@ -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;