Check type before transfer card participants ownership
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com> temp
This commit is contained in:
committed by
Julius Härtl
parent
ce85b4378f
commit
36a9d2e95c
@@ -155,9 +155,10 @@ class AssignmentMapper extends QBMapper implements IPermissionMapper {
|
||||
public function transferOwnership($ownerId, $newOwnerId) {
|
||||
$params = [
|
||||
'owner' => $ownerId,
|
||||
'newOwner' => $newOwnerId
|
||||
'newOwner' => $newOwnerId,
|
||||
'type' => AssignedUsers::TYPE_USER
|
||||
];
|
||||
$sql = "UPDATE `{$this->tableName}` SET `participant` = :newOwner WHERE `participant` = :owner";
|
||||
$sql = "UPDATE `{$this->tableName}` SET `participant` = :newOwner WHERE `participant` = :owner AND `type`= :type";
|
||||
$stmt = $this->execute($sql, $params);
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user