Exemplo n.º 1
0
 /**
  * test grabbing an invalid volunteer by Volunteer is Administrator; volIsAdmin
  */
 public function testGetInvalidVolIsAdmin()
 {
     //grab a volunteer is Admin that does not exist
     $volunteer = Volunteer::getVolunteerByVolIsAdmin($this->getPDO(), true);
     $this->assertSame($volunteer->getSize(), 0);
 }
Exemplo n.º 2
0
 setXsrfCookie("/");
 //get the volunteer based on the given field
 if (empty($id) === false) {
     $volunteer = Volunteer::getVolunteerByVolId($pdo, $id);
     if ($volunteer !== null && $volunteer->getOrgId() === $_SESSION["volunteer"]->getOrgId()) {
         $reply->data = $volunteer;
     }
 } else {
     if (empty($email) === false) {
         $volunteer = Volunteer::getVolunteerByVolEmail($pdo, $email);
         if ($volunteer !== null && $volunteer->getOrgId() === $_SESSION["volunteer"]->getOrgId()) {
             $reply->data = $volunteer;
         }
     } else {
         if (empty($admin) === false) {
             $volunteer = Volunteer::getVolunteerByVolIsAdmin($pdo, $admin);
             if ($volunteer !== null && $volunteer->getOrgId() === $_SESSION["volunteer"]->getOrgId()) {
                 $reply->data = $volunteer;
             }
         } else {
             if (empty($phone) === false) {
                 $volunteer = Volunteer::getVolunteerByVolPhone($pdo, $phone);
                 if ($volunteer !== null && $volunteer->getOrgId() === $_SESSION["volunteer"]->getOrgId()) {
                 }
                 $reply->data = $volunteer;
             } else {
                 if (empty($emailActivation) === false) {
                     $volunteer = Volunteer::getVolunteerByVolEmailActivation($pdo, $emailActivation);
                     if ($volunteer !== null && $volunteer->getOrgId() === $_SESSION["volunteer"]->getOrgId()) {
                         $reply->data = $volunteer;
                     }