Beispiel #1
0
 public function getCreator()
 {
     $u = new Dase_DBO_User($this->db);
     $u->eid = $this->creator_eid;
     $this->creator = $u->findOne();
     return $this->creator;
 }
Beispiel #2
0
 public function getInstructor()
 {
     $inst = new Dase_DBO_User($this->db);
     $inst->eid = $this->instructor_eid;
     if ($inst->findOne()) {
         $this->instructor = $inst;
         return $this->instructor;
     }
 }
Beispiel #3
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');
 }