Exemple #1
0
 public function postToInstructors($r)
 {
     $record = Utlookup::getRecord($r->get('eid'));
     $user = new Dase_DBO_User($this->db);
     $user->eid = $record['eid'];
     if (!$user->findOne()) {
         $user->name = $record['name'];
         $user->email = $record['email'];
         $user->is_instructor = true;
         $user->insert();
     } else {
         $user->is_instructor = true;
         $user->update();
     }
     $r->renderRedirect('admin');
 }
Exemple #2
0
 public function getUtPerson($r)
 {
     if ($r->has('lastname')) {
         $person = Utlookup::lookup($r->get('lastname'), 'sn');
     } else {
         $person = Utlookup::getRecord($r->get('eid'));
     }
     $r->response_mime_type = 'text/plain';
     $r->renderResponse(var_export($person, true));
 }
Exemple #3
0
<?php

include 'config.php';
$eid = 'pkeane';
$eid = 'slb3628';
print_r(Utlookup::getRecord($eid));