You are here

function globallink_get_user_projects in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 gl_ws/gl_ws_common.inc \globallink_get_user_projects()
3 calls to globallink_get_user_projects()
globallink_get_all_ready_translations_details_from_pd in gl_ws/gl_ws_receive_translations.inc
globallink_get_ready_translations_details_from_pd in gl_ws/gl_ws_receive_translations.inc
globallink_get_user_pd_projects in gl_ws/gl_ws_common.inc

File

gl_ws/gl_ws_common.inc, line 177

Code

function globallink_get_user_projects($project_service, $token) {
  $get_user_projects = new getUserProjects();
  $get_user_projects->isSubProjectIncluded = FALSE;
  $get_user_projects->userId = $token;
  $get_user_projects_response = $project_service
    ->getUserProjects($get_user_projects);
  $projects = $get_user_projects_response->return;
  if (!is_array($projects)) {
    $arr = array(
      $projects,
    );
    return $arr;
  }
  return $projects;
}