public function getCurrentUserObject()
 {
     if (!isset($this->currentUser)) {
         $table = new TablePerson($this->context->getDbConnect());
         $this->currentUser = $table->selectByUserId($this->context->getUserId());
     }
     // if
     return $this->currentUser;
 }
Esempio n. 2
0
 public function insertPossession($receiverUid, $fromPersonObjid, $cardObjid)
 {
     $tablePerson = new TablePerson($this->dbConnect);
     $NEW_PERSON_OBJID = '@NEW_PERSON_OBJID';
     $sqlArray = $tablePerson->generateInsertPersonSql($receiverUid, 0);
     $sqlArray[] = $this->generateSqlSetLastInsertId($NEW_PERSON_OBJID);
     $stmt = $this->newInsertStatement();
     $stmt->addNonStringFieldValuePair(self::FIELD_PERSON_OBJID, $NEW_PERSON_OBJID);
     $stmt->addNonStringFieldValuePair(self::FIELD_CARD_OBJID, $cardObjid);
     if (!is_null($fromPersonObjid)) {
         $stmt->addNonStringFieldValuePair(self::FIELD_FROM_PERSON_OBJID, $fromPersonObjid);
     }
     // if
     $stmt->addNowFieldValuePair(self::FIELD_POSSESSION_START);
     $sqlArray[] = $stmt->toString(1);
     $this->executeTransaction($sqlArray);
 }
Esempio n. 3
0
 static function unregisterUser($uid, $dbConnect)
 {
     $table = new TablePerson($dbConnect);
     $table->remove($uid);
 }