示例#1
0
 /**
  * Checks whether the given user email address is assigned to the given
  * issue ID.
  *
  * @param   RemoteApi $client The connection resource
  * @param   array $auth Array of authentication information (email, password)
  * @param   integer $issue_id The issue ID
  */
 public function checkIssueAssignment($client, $auth, $issue_id)
 {
     // check if the confirmation message was already displayed
     if (isset($GLOBALS['_displayed_confirmation']) && !$GLOBALS['_displayed_confirmation']) {
         // check if the current user is allowed to change the given issue
         $may_change_issue = $client->mayChangeIssue($auth[0], $auth[1], $issue_id);
         // if not, show confirmation message
         if ($may_change_issue != 'yes') {
             echo "WARNING: You are not currently assigned to issue #{$issue_id}.\n";
             self::promptConfirmation($client, $auth, $issue_id, false);
         }
     }
 }