Skip to content

Commit

Permalink
Can't get away with one query here. Need to purge other device_policy…
Browse files Browse the repository at this point in the history
…key entries.
  • Loading branch information
mrubinsk committed Oct 11, 2013
1 parent 0c32295 commit 9c6d39f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions framework/ActiveSync/lib/Horde/ActiveSync/State/Mongo.php
Expand Up @@ -559,6 +559,10 @@ public function setDeviceInfo($data)
}

try {
$this->_db->device->update(
array('_id' => $data->id),
array('$pull' => array('users' => array('device_user' => $data->user)))
);
$this->_db->device->update(
array('_id' => $data->id),
array('$addToSet' => array('users' => $user_data))
Expand Down

0 comments on commit 9c6d39f

Please sign in to comment.