From bc667bca26729c446b884de305da224c8e9be4bd Mon Sep 17 00:00:00 2001 From: Brett Bieber <brett.bieber@gmail.com> Date: Wed, 12 Jan 2011 17:21:49 +0000 Subject: [PATCH] make sure the endorsements are being sent --- src/UNL/UCARE/Year1Application.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/UNL/UCARE/Year1Application.php b/src/UNL/UCARE/Year1Application.php index ded18f2..b3bdbac 100644 --- a/src/UNL/UCARE/Year1Application.php +++ b/src/UNL/UCARE/Year1Application.php @@ -110,10 +110,19 @@ You will be asked to comment on the ability of the student to carry out the prop You must log in using your My.UNL (Blackboard) username and password to complete the application. Access the application at the link below:<br /> <a href="'.UNL_UCARE_Controller::getURL().'?view=sponsor">'.UNL_UCARE_Controller::getURL().'?view=sponsor</a></p>'; - $pf = new UNL_Peoplefinder(); - $sponsor = $pf->getUID($this->sponsor_uid); + $mail = 'ldamuth1@unl.edu'; + + if ($sponsor = json_decode(file_get_contents('http://peoplefinder.unl.edu/?uid='.$this->sponsor_uid.'&format=json'), true)) { + if (isset($sponsor['mail'])) { + if (is_array($sponsor['mail'])) { + $mail = $sponsor['mail'][0]; + } else { + $mail = $sponsor['mail']; + } + } + } - UNL_UCARE_Controller::sendHTMLEmail($sponsor->mail, 'UCARE Application', $text); + UNL_UCARE_Controller::sendHTMLEmail($mail, 'UCARE Application', $text); } function emailApplicant() -- GitLab