Esempio n. 1
0
 /**
  * Saves the changes to an authorization assignment.
  * @param CAuthAssignment $assignment the assignment that has been changed.
  */
 public function saveAuthAssignment($assignment)
 {
     $this->db->createCommand()->update($this->assignmentTable, array('bizrule' => $assignment->getBizRule(), 'data' => serialize($assignment->getData())), 'itemname=:itemname AND userid=:userid', array('itemname' => $assignment->getItemName(), 'userid' => $assignment->getUserId()));
 }
 /**
  * Saves the changes to an authorization assignment.
  * @param CAuthAssignment $assignment the assignment that has been changed.
  */
 public function saveAuthAssignment($assignment)
 {
     $sql = "UPDATE {$this->assignmentTable} SET bizrule=:bizrule, data=:data WHERE itemname=:itemname AND userid=:userid";
     $command = $this->db->createCommand($sql);
     $command->bindValue(':bizrule', $assignment->getBizRule());
     $command->bindValue(':data', serialize($assignment->getData()));
     $command->bindValue(':itemname', $assignment->getItemName());
     $command->bindValue(':userid', $assignment->getUserId());
     $command->execute();
 }