/** * Get all projects owned by the given user * @param $username * @return null */ public static function get_all_user_projects($gatewayId, $username) { $userProjects = null; try { $userProjects = Airavata::getAllUserProjects($gatewayId, $username); //var_dump( $userProjects); exit; } catch (InvalidRequestException $ire) { CommonUtilities::print_error_message('<p>There was a problem getting the user\'s projects. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>InvalidRequestException: ' . $ire->getMessage() . '</p>'); } catch (AiravataClientException $ace) { CommonUtilities::print_error_message('<p>There was a problem getting the user\'s projects. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>Airavata Client Exception: ' . $ace->getMessage() . '</p>'); } catch (AiravataSystemException $ase) { if ($ase->airavataErrorType == 2) { CommonUtilities::print_warning_message('<p>You must create a project before you can create an experiment. Click <a href="' . URL::to('/') . '/project/create">here</a> to create a project.</p>'); } else { CommonUtilities::print_error_message('<p>There was a problem getting the user\'s projects. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>AiravataSystemException: ' . $ase->getMessage() . '</p>'); } } return $userProjects; }