예제 #1
0
 public function testTableKnowsAboutSpecialUserNewUser()
 {
     // we have a fake user called 'newuser', which is used
     // by the entry.register module when a new user is
     // registered
     $oRecord = User_Table::getEntryPointRecordFor('tests', 'newuser');
     $this->assertTrue($oRecord instanceof User_Record);
     $this->assertEquals($oRecord->uid, null);
 }
예제 #2
0
 /**
  * @param string $firstName
  * @param string $middleName
  * @param string $lastName
  * @param string $description
  */
 public function add($uid, $firstName, $lastName, $photo, $status, $data)
 {
     $row = User_Table::findFirst($uid);
     $row = $row ? $row : new User_Table();
     $row->data = $data;
     $row->id = $uid;
     $row->first_name = $firstName;
     $row->last_name = $lastName;
     $row->photo = $photo;
     $row->status = $status;
     $row->save();
 }